Hello, Vicky
Thanks for the response. I've searched through the forums and the Knowledgebase (and googled this). I have not been able to find any examples of writing whole 'chunks' of data to a PLC data table using Labview/Datasockets/RSLinx. I am going to use this response to document what I have figured out so far.
I'm trying to update a program that uses HighwayVIEW for the PLC communications. A great third party resource (that makes block reads/writes easy), but it hasn't been updated in a while, and my company now have a site license for RSLinx.
With RSLinx,OPC, Datasockets, and Labview, I can READ multiple words (both integer data tables and boolean data tables).
For example, the Datasocket URL for reading 3 integer words from an "N" data table is "opc://localhost/RSLinx OPC Server/[Controller]N7:49,L7" - which means seven words will be read from the N7 file beginning at N7:49 using OPC topic 'Controller'
Similarly for booleans, you can read them in by words - "opc://localhost/RSLinx OPC Server/[Controller]B3:2,L3 - here three 16-bit integers will be read from the PLC starting at B3:2, where the ‘2’ represents the 2nd word in the B3 data table/file.
My remaining problem is how to WRITE blocks of booleans. It looks from the RSLinx documentation ('RSLinx Online Help') that I should be able to create an array of 16 bit words and write them to the PLC with a URL that looks like "opc://localhost/RSLinx OPC Server/[Controller]B3:6,L2" - with two 16 bit words in an array being sent to the PLC starting at B3/6. This *almost* works. I convert (in the Labview code) the array of booleans to an array of 16 bit integers (U16), then write them to the PLC using the above URL syntax. I can set every bit in each word - EXCEPT for bit 15 (the high order bit)- that never gets affected in the PLC. Time to talk to Rockwell/Allen-Bradley, I think.
I can write to the boolean data tables one word at a time (URL = opc://localhost/RSLinx OPC Server/[Controller]B3:6). But this means for the 160 booleans I need to write, I'm going to have to open 10 Datasocket items. Hopefully that will be fast enough for my application.
I'm trying to update a program that uses HighwayVIEW for the PLC communications. A great third party resource (that makes block reads/writes easy), but it hasn't been updated in a while, and my company now have a site license for RSLinx.
Andrew Russell
Solar Turbines, Inc.
San Diego, California
619-544-2349