LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

shared variable

Hi
I`m developing a project with many shared variable from an OPC server , when I run the VI, I notice that the updating of this variable is very slow. It is possible? or I wrong something.
Moreover I try to reduce the number of the this variable, and it work. So is it a problem of number? And how can I resolve it? 
Thanks
 
0 Kudos
Message 1 of 9
(3,986 Views)

Hi enzo

When you say you reduce the number of variable, do you mean that you have multiple variables in you project and you can reduce this down to one or are you actually placing a smaller number into the variable.

What datatype is the variable that you are using.

Is there any chance if your project is not too large that you can zip it and post it up here so that I can take a look at the variable settings that you have.

I look forward to hearing frorm you as with a little clarification I would hope that we can find a solution to this one

best regards

Graham Green
Software Product Marketing
NI | Emerson
0 Kudos
Message 2 of 9
(3,967 Views)

Hi Graham

My project is made by an OPC Client, and 4 VI, each one has at least 20 shared variable that are word 16 bit, and they are updated at a very slow rate. So I create a VI with just one shared variable, and it work perfectly.

If you need I can develop a small project similar to mine, because it is too big.

Thanks

0 Kudos
Message 3 of 9
(3,961 Views)

Hi

I have developed a new project smaller than the first , and I notice that The updating of the shared variable don`t depend of the number of variable, because I craete 2 VI with different number of variable, and both updating is very slow.

I send a copy of this project...

Thanks

 

0 Kudos
Message 4 of 9
(3,948 Views)

Hi Enzo,

The VIs you posted miss temporization! Every OPC needs time to present and store data into shared variables. From LabVIEW side, almost every Loop Structure requires a temporization function suc as:the 'Wait' or the 'Wait until next ms multiple' functions.

Try to temporize your process first. Than you can monitor the shared variables status by running the NI Variable Manager you can fund under Start»Programs»NationalInstruments»VariableManager»Variable Manager.

Hope this help

Hudson | NIIT AE

0 Kudos
Message 5 of 9
(3,924 Views)
Hi
Thanks for the help, but I try to insert a temporization but the problem remain,
and also  I can see this slow updating of the variable with the Variable Manager, as you suggest.
What can I do?
 
Cheers 
0 Kudos
Message 6 of 9
(3,917 Views)
Hi Enzo,
 
if the udpate you see from the Variable Manager is the same as in LabVIEW, then there's nothing wrong with your code. Rather, does the OPC have an update time for the tag you're binding to the shared variables? Does it correspond with the delay you are seeing into the Variable manager? Maybe you can modfiy it, if possible, in order to speed up the communication.
 
Best regards,
 
Fabio
Fabio M.
NI
Principal Engineer
0 Kudos
Message 7 of 9
(3,897 Views)

Ciao Fabio

Ho notato che il mio VI ha lo stesso update del Variable Manager, ma credo che non dipenda dall`OPC Server e ti spiego perche`:

Precedentemente ho creato un progetto che leggeva alcune variabili dallo stesso OPC server, ed esso funzionava correttamente, mentre adesso in questo nuovo progetto le stesse variabili hanno un update veramente lento...

infatti se nel Variable Manager apro contemporaneamente le due variabili, (quella de progetto che funziona correttamente e quella del progetto che non va) ho notato che la prima funziona correttamente, la seconda no, eppure sono due variabli che  leggono dallo stesso OPC server. Non so!

Grazie

0 Kudos
Message 8 of 9
(3,891 Views)

The English version...

Hi Fabio

I have noticed that my VI has the same update of the Variable Manager, but I think that it don`t depend on the OPC Server, because:

- I have developed recently an other project, with any shared variable linked to the same OPC Server, and it worked perpectly. But now in thi project the same shared variable has a very slow update ...

Infact if I check this on The Variable Manager, I can notice that the Shared Variable of the old progect works correctly, while the same shared Variable of the new project is slow...yet they both are reading the same OPC server...I don`t know...

Thanks

Vincenzo

0 Kudos
Message 9 of 9
(3,887 Views)