LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I mass compile addresses when accessing data via OPC?

I want to access data stored in a PLC that is available via OPC. I have an operator program and a parameter control program that are used during normal operation but does not provide access to the redundant data stored in the PLC. The are 720 registers holding the results from the 60 most recent test. My users want to see or print this data for cross verification against what Labview has storred on the PC. I do not want to create tags for all items and swamp my OPC server but rather to directly access the addresses like I do in the HMI application.
0 Kudos
Message 1 of 5
(2,878 Views)
Hi johnofeasttex,
 
Are you looking for a way to view the registers in LabVIEW or through a separate program?  There are VIs to directly access registers when using Compact FieldPoint, but unfortunately not for third-party PLCs.  If you are able to write the register values to a file, you could compare that information to LabVIEW's data.  
Jennifer R.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 5
(2,853 Views)

You could use the data registers as a string and define each tag in blocks of around 100-125 registers each for string length. The only gotcha is that a value of 0 in a register is considered a null and terminates the ASCII string. If you could add one to all of the registers beforehand, and subtract one in the labview side, you can workaround this issue. This will let you use fewer tags on the OPC side of things. I think the latest tag system(8.5) lets you define a tag as an array of register values, but I haven't used this version yet.

The other thing to consider is how do you know if the opc data values have all updated with new data. I had to add checksums on the plc data blocks. Then have labview read and recalculate the checksums until all of the data matched. Try running an upcounter value into your data registers that increments on each plc scan. Then have labview read the OPC data and see if you get a smooth line that increases without any spikes or drops caused by old data.

0 Kudos
Message 3 of 5
(2,849 Views)

Hi Jennifer,

There is a PLC actually running my machine. I am using Labview for the operator interface and to append a file at the conclusion of each test. The PLC also stores this data but only fot the 60 most recent test. The are 720 registers in the PLC that are used for storing this data. My customer's want to view and print all of this data from the PLC for comparison against what was written to the PC. I am using an OPC server on the PLC for communication between my applications and the PLC as well as to present the data for collection directly into thier SQL server.

Thanks for the response.

Johnofeasttex

 

0 Kudos
Message 4 of 5
(2,839 Views)
Hi unclebump,
 

There is a PLC actually running my machine. I am using Labview for the operator interface and to append a file at the conclusion of each test. The PLC also stores this data but only fot the 60 most recent test. The are 720 registers in the PLC that are used for storing this data. My customer's want to view and print all of this data from the PLC for comparison against what was written to the PC. I am using an OPC server on the PLC for communication between my applications and the PLC as well as to present the data for collection directly into thier SQL server.

I am trying to access these registers in the PLC without having to manually open each item properties on screen and setting a datasocket connection individualy for each. In the mass properties dialog I saw, I could go down a list configuring networked tags but not PLC data addresses within an OPC call.

Thanks for the response.

Johnofeasttex

0 Kudos
Message 5 of 5
(2,835 Views)