LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

compare delay in CVI and labview


test_man ha scritto:

In LabVIEW you are running both blocks simulteneously. (Delay and Digital pulse)

 

 

In CVI you are running sequencially.

 


With the code I posted timer and digital output start at the same moment.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 11 of 12
(1,187 Views)

PKIM ha scritto:

I just test it with CmtScheduleThreadPoolFunction to spawn many threads to paralellize the code but it doesn't for short sleep. It will only work if sleep is so long. I think it is due to if you just want to sleep for few milliseconds, the time to create the threads, set/get policy and runing a pooling loop will be much longer than few milliseconds.


I didn't explain myself well. My intention was to change your entire sequence in the way I posted, not to have a simple step executed in its own thread; this way SetSleepPolicy is called only once before the sequence executes, Also, I wanted you to try the entire code without multithreading, just to check the behaviour of the system in plain and simple conditions. If this is satisfactory, next you can try moving it to a separate thread and optimize it as needed.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 12 of 12
(1,186 Views)