10-27-2009 04:45 PM
I recently upgraded my application from LV/DSC 7.1 to 2009. The application reads about 50 tags from an OPC server on every iteration of a loop. I updated the application to use the newer DSC routines, with shared variables interfacing to the OPC server. In the old version the loop time was <1 second, which was acceptable. Now the loop time is >4 seconds, and it seems that each variable takes ~100 ms to read. This is way too slow.
Interestingly, if I read the same variable 50 times in a row it's extremely quick. The problem seems to be reading 50 different variables.
The OPC server is identical. The only thing that's changed is the version of DSC (and, of course, the DSC routines used to interface with the OPC server). What can I do to speed this up??
Thanks,
Charlie
10-28-2009 05:25 PM
Charlie
So the slow down you are seeing is expected, in the last 5 years as DSC has become more robust and stable. How are you reading from your variables, can you post your VI or at least a screenshot. One thing to check is make sure your error wires are connected LV can function faster if the execution order is predetermined.
10-29-2009 08:01 AM
I have not personally seen the mutation of LV 7.1 to LV 2009 so I can only speculate.
Is the updated code reading from the shared varibles using shared variable nodes or is sub-VI used?
Switching over to Datasocket reads helped in my app (open once and use ref to do the reads).
I fear the mutated code is opening reading and then closing the datasokcets.
Again, just speculating.
Ben
10-30-2009 08:55 AM