LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PLC Shared Variable array size limit

I'm getting SGL data values from an array from a PLC. I seem to be hitting a size limit at around 120-125 elements. I can see the array element values in the RSI-OPC Test client but not in LV. There are 160 elements in this array and I need to be able to get all of them. Thanks in advance.

PaulG.
Retired
0 Kudos
Message 1 of 7
(3,694 Views)

124 is the limit. When you go over 124 words you need to read twice to get all of the information. I have to read three times when I need to read all 255 words. This is really easy to do. Set up a shift register and a constant to tell how many wrods you need to read then set the read to read 124 and then the rest.

Tim
GHSP
Message 2 of 7
(3,688 Views)

Thanks for the info. I'll try it out. Is this documented anywhere?

PaulG.
Retired
0 Kudos
Message 3 of 7
(3,686 Views)

Still not getting it. Can you show me an example?

PaulG.
Retired
0 Kudos
Message 4 of 7
(3,683 Views)

It should look something like this.

 

PLC Read Example.png

Using the shift register and a state machine you can cause the state machine back to the read as many times as it take to finish the number of words that you need. You will have to calculate the new starting element everytime it goes through.

 

Here is the other frames:

 

PLC Read Example 2.png

Tim
GHSP
0 Kudos
Message 5 of 7
(3,677 Views)

We are talking about two different types of shared variables, I think. I'm looking at an array of SGL data values like this:

 

shared variable array.png

PaulG.
Retired
0 Kudos
Message 6 of 7
(3,672 Views)

I found a workaround. I created new shared variables, breaking up the one and splitting it into two and offset the index in the 2nd array. This makes my data a little easier to work with, anyway. Thanks for at least pointing me in the right direction.

PaulG.
Retired
0 Kudos
Message 7 of 7
(3,669 Views)