ngo4life
MrPLC Member-
Content count
20 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Calendar
Everything posted by ngo4life
-
/* 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"); }
-
Allen Bradley SLC 150 PLC for sale
ngo4life posted a topic in For Sale, Employment, Services or Wanted
Anyone in need of SLC 150 AB PLC. I have three working ones. Let me know. -
Freelance programmer
ngo4life replied to Alekhandro's topic in For Sale, Employment, Services or Wanted
Hi Alekhandro, I am interested in becoming a contact programmer for you. I will stay local though. Neo -
Allen Bradley SLC 150 PLC for sale
ngo4life replied to ngo4life's topic in For Sale, Employment, Services or Wanted
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 -
How to set up TXD and RXD between CJ1M CPU12 and CQM1 CPU41
ngo4life replied to ngo4life's topic in Omron
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. -
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.
-
How to set up TXD and RXD between CJ1M CPU12 and CQM1 CPU41
ngo4life replied to ngo4life's topic in Omron
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. -
How to set up TXD and RXD between CJ1M CPU12 and CQM1 CPU41
ngo4life replied to ngo4life's topic in Omron
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 -
How to set up TXD and RXD between CJ1M CPU12 and CQM1 CPU41
ngo4life replied to ngo4life's topic in Omron
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? -
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
-
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
-
Could you show me an example. I am using CQM1 CPU41
-
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
-
Ok, I will try that. Thanks
-
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.
-
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