brk_h

MrPLC Member
  • Content count

    22
  • Joined

  • Last visited

Community Reputation

3 Neutral

About brk_h

  • Rank
    Sparky

Profile Information

  • Gender Male
  • Country United States

Recent Profile Visitors

1505 profile views
  1. R88D-KN0-2ML Inputs

    The manual says use "0094 9494 hex" (which is default) for NC operation. NC is the case where drive will stop if there is no connectivity between pin 5 on CN1 and negative DC. Or, use "0014 1414 hex" for NO operation where the drive will stop if there is connectivity between pin 5 on CN1 and negative DC. I'd use the NC case. This way, you make sure the drive will stop if there is a wire connection problem. By the way, make sure you always have +24VDC on pin 6 on CN1.
  2. R88D-KN0-2ML Inputs

    If you have a contact between Pin7 and negative DC supply then when the contact opens(no connectivity between Pin7 and negative), the servo will stop. The servo will run only if there is connectivity between Pin7 and negative DC. Depending on the safety level required, you may consider using redundant power relays and e-stop buttons monitored by a separate safety relay and have one of the NO contacts on your power relays connected between Pin7 and negative DC. On the other hand, verify that it's Pin7 for Input1, it may be Pin5.
  3. FINS/TCP using Java

    I made three changes: 1) ip = "192.168.0.10"; (changed from localhost to ip address) 2)In LeggiWord(): pacchetto[7] = 26; (changed from 22 to 26) 3) In Leggi(): pacchetto[19] = -56; (changed to my node 200 from 0) Then, your code worked fine! run:Start program... Connected to /192.168.0.10 on port: 9600 Attendo risposta...70 73 78 83 0 0 0 16 0 0 0 1 0 0 0 0 0 0 0 -56 0 0 0 10 Attendo risposta...70 73 78 83 0 0 0 86 0 0 0 2 0 0 0 0 -64 0 2 0 -56 0 0 10 0 100 1 1 0 0 0 0 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 0 0 0 0 0 51 50 1 80 48 48 92 92 0 0 0 4 0 -26 10 70 0 116 0 0 0 0 0 0 10 70 0 0 0 0 0 0 0 0 0 0 0 13 0 0 0 0 Fine...BUILD SUCCESSFUL (total time: 2 seconds)
  4. FINS/TCP using Java

    No, you have to run the connect() function in java with the following: 70 73 78 83 0 0 0 12 0 0 0 0 0 0 0 0 0 0 0 80 (here I corrected error code 2 as 0. Also, assuming 80 is your PC's IP address node e.g. 192.168.0.80, in my case it's 200 or 0xC8 and my PLC is 10 or 0x0A) Then, send the command to read 32 words from D140. I ran the Main.java with my PLC and got the following result. It received 32 words from D140 correctly: run:Connected using IP: /192.168.0.200:50351 Port: 50351Listening...Send: 46494E53 0000000C 00000000 00000000 000000C8 Receive: 46494E53 00000010 00000001 00000000 000000C8 0000000A 00000000 00000000 00000000 00000000 Listening...Send: 46494E53 0000001A 00000002 00000000 Send: 80000200 0A0000C8 0064Send: 01018200 8C000020 Receive: 46494E53 00000056 00000002 00000000 C0000200 C800000A 00640101 00000000 00000000 00000005 Listening...Receive: 00000000 00000000 00000000 33320150 30305C5C 00000004 00E60A46 00740000 00000000 0A460000 Listening...Receive: 00000000 00000000 000D0000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 Listening...
  5. FINS/TCP using Java

    The error code in the response is "2" (the value before -128). 70, 73, 78, 83, 0, 0, 0, 16, 0, 0, 0, 1, 0, 0, 0, 2, -128, 0, 2, 0, 0, 0, 0, 80 Error Code 2 : The data length is too long
  6. Working with arrays

    Here is an example of how you can implement your array operation: 1) Create 2 INT arrays in your Symbols table as: MyArray at D100 with size INT[100] OutputArray at D1000 with size INT[100] 2) Create your FB as: FOR i:=0 TO 99 BY 1 DOInputArray:=InputArray*2;END_FOR;Here InputArray is defined as In-Out variable with 100 size.3) In your main ladder logic, create rung with a single shot contact and XFER &100 D100 D1000. This rung will transfer the 100 elements from your MyArray to OutputArray.4) In your second rung, insert a single shot contact and a call to your FB. Enter OutputArray as your input. To run this: Insert some dummy values at D100 to D103. Force the single-shot contact in your first rung and then force the single-shot contact in the second rung. You'll see that OutputArray elements at D1000 will be multiplied by 2. The key here is to use single-shot contact to trigger your FB to be able to execute your for loop one time only.
  7. Problems with OC211 relay outputs

    1) Make sure the PLC is in Run or Monitor mode. 2) Disconnect all of the output ports and keep A8 is connected to 24V. Check the outputs with voltmeter and make sure you read 0 V between the port and negative on power supply. Then, force one of the outputs ON and make sure you read 24V on the output port you forced. You should pay attention to the current your load is drawing. You shouldn't exceed 2A on outputs.
  8. Problems with OC211 relay outputs

    I'm assuming the right-most module is OC211. The blue wire with 24V is connected to A8 on the left but not connected to B8 on the right. You should have a jumper between A8 and B8.
  9. FINS/TCP using Java

    It's not clear whether you found a solution to your problem with the java compiler. Just in case, I'm posting what I've done to run it successfully. Follow the instructions below to run the java file: 1) Place both java files into the same folder. 2) Open each java file and delete the first line where it says: "package com.prova;" 3) Type "javac Listener.java" and hit enter to compile Listener. This will generate a file called Listener.class. 4) Type "javac Main.java" and hit enter to compile Main. This will generate a file called Main.class. 5) Type "java Main" and hit enter. This will start executing the program.
  10. This question had been asked many times and I forgot how many times I posted the same answer, but again I'm copying and pasting: I suggest you use Ethernet communication and there are 2 ways to do this. 1- Using FINS commands (low level): You should download this VB.Net source code and see how it communicates with UDP then do the same in your application. http://forums.mrplc....ds&showfile=992 Also, download the following pdf file for details on FINS command. http://forums.mrplc....ds&showfile=620 These are the only 2 links you need to build a VB .NET application to read/write bits in your PLC. 2- Using either DDE or OPC connection (high level): The other option is to have DDE or OPC connection to your PLC to read/write data. You can either use CX-Server DDE Manager (search for CDMDDE.exe) or OPC server such as Kepware ((http://www.kepware.com/kepserverex/) to setup the communication and tags. DDE connection software comes with the Omron suite, so there is no cost to you. But, if you prefer OPC connection, then you have to buy or use the trail version. If you search the web, you can find plenty of .NET example source code to implement a DDE or OPC connection.
  11. Omron CJ1M-CPU13-ETN to .NET Framework

    The other option is to have DDE or OPC connection to your PLC to read/write data. You can either use CX-Server DDE Manager (search for CDMDDE.exe) or OPC server such as Kepware ((http://www.kepware.com/kepserverex/) to setup the communication and tags. DDE connection software comes with the Omron suite, so there is no cost to you. But, if you prefer OPC connection, then you have to buy or use the trail version. If you search the web, you can find plenty of .NET example source code to implement a DDE or OPC connection.
  12. Omron CJ1M-CPU13-ETN to .NET Framework

    You should download this VB.Net source code and see how it communicates with UDP then do the same in your application. http://forums.mrplc....ds&showfile=992 Also, download the following pdf file for details on FINS command. http://forums.mrplc....ds&showfile=620 These are the only 2 links you need to build a VB .NET application to read/write bits in your PLC.
  13. I noticed that you are using SOCK_STREAM instead of SOCK_DGRAM which I have used in Java below to create Datagram packets. This will not solve your problem, but just a suggestion. On the other hand, while I haven't tried, you may use "localhost" or whatever the IP address of your PC running the simulator in the line of the RemoteIPAddress just like the line1 of the following code snippet in Java. String RemoteIPAddress= "192.168.0.10"; String SID, RSV, GCT, ICF; String SNA1= "00"; String SA11= "78"; String SA21= "00"; String DNA1= "00"; String DA11= "0A"; String DA21= "00"; int CmdLength, Cnt; byte[] ByteArray; byte[] receiveData = new byte[1024]; String Header, tmp1, CMND; InetAddress Remote_IP; DatagramSocket Ethernet_Socket; Cnt = 0; ICF = "80"; GCT = "02"; RSV = "00"; SID = "00"; Header = ICF + RSV + GCT + DNA1 + DA11 + DA21 + SNA1 + SA11 + SA21 + SID; CMND = Header + "010182019A000018"; CmdLength = CMND.length(); ByteArray = new byte[1 + (CmdLength - 2) / 2]; String strValues = ""; Ethernet_Socket = new DatagramSocket(9600); try { Remote_IP = InetAddress.getByName(RemoteIPAddress); DatagramPacket sendPacket = new DatagramPacket(ByteArray, ByteArray.length, Remote_IP, 9600); Ethernet_Socket.send(sendPacket); Ethernet_Socket.setSoTimeout(200); DatagramPacket receivePacket = new DatagramPacket(receiveData, receiveData.length); Ethernet_Socket.receive(receivePacket); Ethernet_Socket.close();
  14. android controlling app

    Yes, there is a product by Opto22 called groov (http://www.groov.com/) which lets you access your PLC remotely via a smart phone or tablet. It works on both IOS and Android.
  15. Comparison between CJ1W-ETN21 and CJ1W-EIP21

    Hi, You can access a PLC remotely via web browser using an OPC server. There are many companies selling OPC server software. The mostly used ones are Kepware (http://www.kepware.com/kepserverex/), Ingear (http://www.ingeardrivers.com/omron_opc_server/omron_opc_server.htm) and Indusoft (http://www.indusoft.com/). There is a cool product by Opto22 called groov (http://www.groov.com/) which lets you access your PLC remotely via a smart phone or tablet. You also need a web server between the OPC server and web browser. All of these companies provide you a free trial version of their software so you can play and decide what to to buy. Configurations are very similar, so once you learn one of them, you spend less time to configure others. By the way, you can use EIP21 with all of the products I mentioned above. Good luck.