ngo4life

MrPLC Member
  • Content count

    20
  • Joined

  • Last visited

Everything posted by ngo4life

  1. send FINS command using Java UDP/IP

    /* This program will read 150 words of data memory starting from D100 * The ethernet unit IP address is 123.456.789.01 * The PC IP address is 123.456.789.02 * Note: I as the poster, will not be responsible for any damage/injure in properties and/or human. * Try this at your own risk. This is for someone who knows java and omron plc programming. */ // get a datagram socket try{ socket = new DatagramSocket(); } catch(SocketException se){ } // send request byte[] buf = new byte[18]; buf[0] = (byte) 0x80; //ICF buf[1] = (byte) 0x00; //RSV buf[2] = (byte) 0x02; //GCT buf[3] = (byte) 0x00; //DNA buf[4] = (byte) 0x01; //DA1 buf[5] = (byte) 0x00; //DA2 buf[6] = (byte) 0x00; //SNA buf[7] = (byte) 0x02; //SA1 buf[8] = (byte) 0x00; //SA2 buf[9] = (byte) 0x00; //SID buf[10] = (byte) 0x01; //MRC buf[11] = (byte) 0x01; //SRC buf[12] = (byte) 0x82; //Variable Type:DM buf[13] = (byte) 0x00; buf[14] = (byte) 0x64; buf[15] = (byte) 0x00; buf[16] = (byte) 0x00; buf[17] = (byte) 0x96; try{ address = InetAddress.getByName("123.456.789.01"); } catch(UnknownHostException uhe){ } packet = new DatagramPacket(buf, buf.length, address, 9600); try{ socket.send(packet); } catch(IOException ioe){ } byte[] buf1 = new byte[1000]; packet1 = new DatagramPacket(buf1,buf1.length); try{ socket.receive(packet1); } catch(SocketException se){ System.out.println("can't receive packet"); } catch(IOException ioe){ System.out.println("can't receive packet"); }
  2. Anyone in need of SLC 150 AB PLC. I have three working ones. Let me know.
  3. Freelance programmer

    Hi Alekhandro, I am interested in becoming a contact programmer for you. I will stay local though. Neo
  4. Hi Chris, Sorry for a late response. I have not logged in for a while. I' ve been busy. I don't have the PLC available any more. I gave them away. I am sure you can find them on Ebay. Neo
  5. I have tried all the combinations in the PLC setting dialogs of CQM1 and CJ1M but i can only tranfer data from cqm1 to cj1m but not the other way around. I ran out of idea, please help.
  6. Hi all, I want to use TXD and RXD instructions to send and receive data to and from CJ1M to CQM1. How do I set up CJ1M and CQM1. I want to send data through RS232 not Peripheral port. Could anyone send me an example. Please help. Thank you very much.
  7. I use the TXD-RXD CS/CJ program that you posted. The setting for end code in the plc set up is 0x000D. One thing i notice is as soon as i turn on the InitiateComm bit 0.01, the Port Ready Flag turns off right the way. This does not happen in CQM1. I have to turn off power of the CJM1 and turn it back on to turn the Port Ready Flag on.
  8. I only got it to work in sending from CQM1 to CJ1M. It does not work if i send from CJ1M to CQM1. I tried everything. Please help
  9. Do i need to download the program to both CJ1M plc and CQM1 plc. I tried that but i did not work. I also tried to download to just CJ1M but it didn't work. The same is for CQM1. I set the parameters according to the setting stated in the program. What did i do wrong?
  10. what is the shortest logic

    What is the shorted logic to move input bits to HR bits as below: 1.0 TO H1.1 1.1 TO H2.1 1.2 TO H3.1 1.3 TO H4.1 1.4 TO H5.1 1.5 TO H6.1 1.6 TO H1.2 1.7 TO H2.2 1.8 TO H3.2 1.9 TO H4.2 1.10 TO H5.2 1.11 TO H6.2 And 2.0 TO H1.10 2.1 TO H2.10 2.2 TO H3.10 2.3 TO H4.10 2.4 TO H5.10 2.5 TO H6.10 2.6 TO H1.11 2.7 TO H2.11 2.8 TO H3.11 2.9 TO H4.11 2.10 TO H5.11 2.11 TO H6.11 Please help sending me a code sample. Thanks
  11. what is the shortest logic

  12. what is the shortest logic

  13. what is the shortest logic

  14. How to scan Input words bit by bit

    Hi all, I have 5 input words that i use. How can i create a loop to scan 16 bits of the first input word then go back and scan the next input word bit by bit and so on until 5 words are scanned. Base on the condition of these bits the program will do something. How can i set indirect addressing for IO instead of DM area Please help
  15. How to scan Input words bit by bit

    Could you show me an example. I am using CQM1 CPU41
  16. diplaying output window

    Hi all, After i selected Hide option on the output window i clicked on output window to diplay it but it didn't. I also tried using view/windows and Alt+2 but nothing worked. the same happened to address reference tool window. It is ok with project workspace window. Can anyone help
  17. diplaying output window

    Ok, I will try that. Thanks
  18. diplaying output window

    Thanks for your reply. I tried as you showed but i still didnt work. I closed all the tool bars all the windows and clicked on output window button and also tried alt +2 nothing worked. Very frustrated.
  19. download to plc error

    Hi all, Please help me. I hava a CQM1 CPU41. I am trying to download my program to this plc. I am able to go online but when i click download to plc i get a message like: can't download, error found during compiling. I clicked the compile button but no error message displayed. Can anyone help me what i am doing wrong. Thanks
  20. download to plc error

    CX programmer