02-24-2009 11:54 AM
02-24-2009 12:56 PM
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.
02-24-2009 03:07 PM
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??
03-04-2009 08:09 AM
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.
03-04-2009 01:57 PM - edited 03-04-2009 01:59 PM
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,
03-18-2009 08:46 AM
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?
03-18-2009 10:21 AM
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.
03-19-2009 02:04 PM
03-19-2009 05:36 PM - edited 03-19-2009 05:38 PM
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,
03-31-2009 05:32 AM