NI Labs

cancel
Showing results for 
Search instead for 
Did you mean: 

Welcome to EtherNet/IP Driver for Communication to Allen Bradley ControlLogix PLCs

Better image hopefully
0 Kudos
Message 41 of 193
(19,184 Views)

Castironut,

 

With the CompactLogix  the network path should probably always be "ip_address,1,0". The 0x311 code means the port is unavaila" looks like it would not likely be the bname of the ble, which is likely because you had ",0,1" in the address. Secondly, are you sure the Tag you have listed ("System Variable.IP Address") is correct on the PLC? If you could show a screenshot of your tags in RSLogix5000 it might help.

 

Eric 

0 Kudos
Message 42 of 193
(19,179 Views)

Thank you for your help

The ip_address,1,0 worked

the tags are verbatim out of logix

I am now successfully moving info from the camera to the processor to  a panelview

right now i am just using system variable#parts count to see data flow

I will build on this

Thank you so much for your help

Also i am using the "MOV" instructions  what are some others through logix that will work??

Anyone out there have samples such as this??

0 Kudos
Message 43 of 193
(19,173 Views)

I am using a UDT in RSlogix that has a real tag and two boolean tags.  This UDT is then in an array.  I would like to be able to write from labview to either the array or each individual element using the raw write tag function.  I am able to successfully read these elements but I am having difficulty writing to the controller.  Any suggestions for writing using the raw command.

 

 

 

 

 

0 Kudos
Message 44 of 193
(19,123 Views)

Hi ftsiii,

 

Unfortunately reading UDT tags is a bit more complex. The Raw read/write will certainly give you access to the data. The hard part is encoding/decoding it. The packing and alignment of UDT types is complicated and you would likely have to refer to the document here: http://www.rockwellautomation.com/enabled/pdf/TypeEncode_CIPRW.pdf. You may be able to cheat a little by closely examining the data returned from the read VI for the same tag. The main difference between a read and write is generally the addition of a number of elements to write in the data.

 

Here is a screenshot showing the data layout for a COUNTER type (not a UDT, but it is the same concept). Keep in mind that the multi-byte fields are in little-endian order.

 

 

In general, an easier mechnanism is instead to read/write the individual elements of the UDT. Since the EtherNet/IP requests are asynchronous, multiple requests can be completed in parallel. This means that you can simply do reads/writes in parallel on the LabVIEW diagram and they can generally run in the same time as a single operation. Now, one disadvantage is that the reads/writes are not atomic, but I'm not sure Rockwell PLCs make that guarantee on reads/writes to UDTs anyways. Here is a screenshot showing how you could read the same COUNTER type in this manner:

 

Hope this helps, 

Eric 

Message Edited by BlueCheese on 03-04-2009 01:59 PM
Download All
0 Kudos
Message 45 of 193
(19,114 Views)

I am using another (other then AB) PLC which uses EthernetIP as one of its communications protocolls.  I would like to be able to send messages to/from labview from/to the plc.  Current this plc uses assemblies and objects to talk ethernetIP.  I see that this driver can read and write assemblies.  Does this driver or will it support generic objects as well?

0 Kudos
Message 46 of 193
(19,006 Views)

Hi ftsiii,

 

What kind of PLC are you using? If the PLC will let you configure a remote I/O assembly then it should work with our driver. You'd simply have to create assemblies in LabVIEW that match assemblies you configure on the PLC. We don't currently support creating objects, so assemblies are simply blocks of memory that your program can decide how to use.

 

If you have any issues please describe the PLC you are using and send screenshots of the PCL setup and your LabVIEW code and I'll see how I can help.

 

Eric 

0 Kudos
Message 47 of 193
(18,999 Views)
LabviewI am having difficulting conneting my controllogix controller with labview using assemblies attached are two screen shots of the configuration of the 1756-ENBT and my vi.  I get an 16#0005 Connection Error: Bad class when the controller is trying to connect to pc.
Download All
0 Kudos
Message 48 of 193
(18,974 Views)

Hi ftsiiiii,

 

As far as I can tell, your code does look like it should work. My first suggestion would be that are you sure you have the code running when you see the error on the PLC? If the LabVIEW code is not running and those assemblies are not created I would expect that you would get a similar error on the PLC. The PLC tends to try to reconnect every few seconds so as soon as your LabVIEW VI starts the error would go away. Also, you should not need to create the zero-sized configuration seembly on the LabVIEW side as the PLC will ignore it anyways.

 

I have attached a simple example (including a screenshot of the corresponding RSLogix 5000 setup) that should show you how to handle an array of 8 DINT registers in both input and output assemblies.

 

Let me know if this helps,

Eric 

Message Edited by BlueCheese on 03-19-2009 05:38 PM
0 Kudos
Message 49 of 193
(18,963 Views)
Is it possible to use this library for communication to Ethernet/IP slave nodes other than Allen Bradley PLCs?
0 Kudos
Message 50 of 193
(18,855 Views)