LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

pc too slow?

Hi!

First of all, my VI is running on a P2 350 with 128mb of Ram and at the moment, there is no faster PC available for
my Desk. My VI communicates with a lock-in amp and a monochromator. Sometimes the VI hangs up at a point, where it should send actual position data to the monochromator, but the data that is send is still the one from a step before. When I take a probe at the visawrite vi, I can see that in the error case, the new data occures to late in the probe, at a moment where the data is already sent to the monochromator. I solved the problem by additional delays, but I don´t think that this is a state of the art solution. Is it possible, that the pc is too slow?

Thanks to everybody!

P.S. sorry for my bad english
0 Kudos
Message 1 of 7
(2,854 Views)
While your pc isn't the fastest thing around, it's also possible you have dataflow problems in your program. Are you using local variables? Are all of your error in/out connections wired? Posting your VI would help to determine the cause of the problem. Do a Save with Options and select Development Distribution so that all of the subVIs are included.
0 Kudos
Message 2 of 7
(2,840 Views)

I agree with Dennis.

Your problem is most likely with the code, not with the hardware. You must ensure proper dataflow.

From a computer perspective, communications are typically much slower than other code. If you need to insert a delay to fix it, your computer is already too fast 😉

(I still run a few instrument control programs on a 120MHz P1 with 48MB of RAM and never had any problems.)

0 Kudos
Message 3 of 7
(2,826 Views)
After some consultation, I am allowed to post the vi here. The problem occures in the subvi transmessung, found on the sequence number 2 of the stacked sequence structure in the event called startmessung. The delay, in the first sequence solved the problem so far. AktuelleWlänge is the signalline that causes the troubles.
In case of any questions, I can provide more detailed information.

Thanks!

Sorry for the german headlines in the vi.
0 Kudos
Message 4 of 7
(2,820 Views)
Hello mr.knd,

as Altenbach told you: ensure a proper dataflow!

If you would use error clusters more intensively you could get rid of most of the sequence structures. You also use a load of local variables in your code giving you potential race conditions.
And last but not least you have big loops and sequences inside of an event structure. Try to get them out of the event handling!
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 7
(2,808 Views)
Thank you GerdW!

Can you please explain to me why using of errorclusters is a replacement for some of my sequencestructures? And what possibilitys are there to decrease the number of used local variables?

best regards

mr.knd
0 Kudos
Message 6 of 7
(2,782 Views)
Hello mr.knd,

I made a picture for you. It shows one of my measurement setups... You see the error cluster wire going through the whole diagram. This way you easily can control the timing of your program (what is executed first, what comes after?).

And yes, there are some sequences around 🙂 Sometimes it's hard to replace them with other structures.

To replace local variables: you should use wires whenever possible. Make your sequences flat and use wires instead of locals in each frame. Or even remove sequences and use wires 🙂


Message Edited by GerdW on 11-08-2005 04:46 PM

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 7
(2,746 Views)