LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the best way to disable tags in SVE when a OPC server is not available?

I have a LV2009 DSC app with SVE that reads tags (1100 spread acrross them) from 4 PLC's through NI OPC server.  From time to time the PLC will lose power because that test machine will be powered down.  The NI OPC  loses the OPC link then to that particular machine/PLC and this error is transferred through to the SVE. 

 

Is there an any/efficient way to stop the reading of tags if/when this happens?  The only way I can think of is to undeploy/re-deploy from the app when it is necessary. 

 

In the same way is it possible to prevent the SVE acting on this error?

 

I also have a longstanding problem with updates of tag values to the frontend of the LV VI.  The update rate into SVE seems OK, but the tag values are slow to update onto the page.  I have reduced the amount of tags on the pages as well as reducing the amount of code on a page.  It becomes better, but I would like to have an update of less than 2 seconds at least to properly display plant status.  I'm running a heartbeat timer from a PLC and in some cases this takes up to 15 seconds to update.

  

Any assistance will be appreciated.

 

Pierre

0 Kudos
Message 1 of 4
(2,795 Views)

Your PLCs work as OPC client and SVE also am I right? 

 

 

In the same way is it possible to prevent the SVE acting on this error?

I haven't never seen a code which affects direct to SVE. I think that only way solve this is do some coding on VI side. Can you do a "idle" mode to your code? If you can see an error you can set your application to idle mode. When OPC connection comes back to normal state you can change back to "normal" mode.

 

I also have a longstanding problem with updates of tag values to the frontend of the LV VI.

Do you use shared variable nodes or datasocket to read values? In both cases have you set "timeout" value to node or datasocket read VI?

0 Kudos
Message 2 of 4
(2,782 Views)

Hi SnowForest,

 

Thanks for the reply.

 

I'm using SV nodes.  How do uo set the timeout?  Through property nodes?

 

Pierre

0 Kudos
Message 3 of 4
(2,772 Views)

PierreN,

 

In order to set the timeout value of a Shared Variable, you may Right-Click, and select 'Show Timeout':

SV_Timeout_RT Click.JPG SV_With_Timeout.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Implementing Timeouts through your application variables will allow you to gage which variables are, and are not updating. This troubleshooting stepp will allow you to better characterize the source of the slowed update rate. You also may take a closer look at the OPC Server configuration, and the deadnband settings you have implemented on the I/O Clients. 

 

 

Snowforest has offered good advice in terms of implementing a State-Machine architecture to handle the 'Power Down' system status. Also, if you know the specific error that is propagated, you may choose to implement implicit error handling using the data contained in the Error Cluster.

 

Cheers,

 

Pcorcs

 

 

Patrick Corcoran
Application Engineering Specialist | Control
National Instruments

0 Kudos
Message 4 of 4
(2,758 Views)