LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading URL in Datasocket Problems

I am reading 2 BYTES of data from a PLC (Seimens S7-300) using OPC server. I can read each BYTE seperatly both in OPC server and in my application. But I need to read them both together using a Boolean Cluster. I can read the word into an Array. But if I convert it to a Cluster I only gat the first Byte. I have tried using a reading VI to read the first Byte and another reading the second but then nothing get read. No doubt there is a simple solution. Please help.
Thanks

Tom
0 Kudos
Message 1 of 5
(2,987 Views)
Tom,

Easiest way - read Word from OPC instead of two bytes. First check that your Word is OK in OPC Scout (normally installed togetger with Siemens software).
But you wrote: "I can read the word into an Array."
It means that Boolean Array correct? And cluster not?
If "Array to Cluster" function was used, and may be definition for Cluster Size is forgotten? (Right mouse click -> Cluster Size - default number elements in cluster = 9).

Andrey

PS. You can post small VI here with illustration of your problem...
0 Kudos
Message 2 of 5
(2,987 Views)
Hi Tom,
I agree with Andrey's idea, have you set the cluster size? A cluster has a fixed size and when the array to cluster function is used it is given a default size of 9. Therefore, if I understand you correctly, your boolean array of 2 bytes, or 16 bit elements cannot be displayed and you only see 1 byte and a bit or 9 bytes. Try setting the array to cluster size (by right clicking the function and selecting 'cluster size') to a number larger than 16 (9 is default) and your data should be displayed in full. Please try this and let me know how you get on.

Chris M
Applications Engineer, NI
0 Kudos
Message 3 of 5
(2,987 Views)
Hi,
Many thanks you are both spot on I knew it would be something simple. Once I set the size it worked fine.

Thanks

Tom
0 Kudos
Message 4 of 5
(2,987 Views)

Hi, tis seems like a rather old thread, but yet indicates somehow that Tom can access live data from S7 300 OPC server on Labview (presumably OPC client)...

 

I have already left a question in another thread about my problem not being able to access live data of OPC server machine from Labview OPC client  machine.

 

If you are still around, you (Tom or others) may also have coments on what I need to do / add ?

 

Sia

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