LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronization problem in "continuous measurement and logging" template

Solved!
Go to solution

Hello everyone,

I am using the template above for my measurements and I need to put a time delay in the acquisition loop (about 1000 ms). 

Unfortunately, because of this delay the program does not enter into the logging loop. That means that the message "logging stopped" is not sent and the tdms file is not created!.

I can solve this problem by putting a longer time delay in the logging loop also, but I don't think this is the real solution for this kind of problem.

Is someone know about this problem?

I will very appreciate your help..

Roey

0 Kudos
Message 1 of 18
(3,077 Views)

Hey Roey,

 

Thanks for reaching out. Would you mind providing your VI? You can attach it here and we all can look at it or run it and see if you are doing any timing functions that are affecting the order of execution of you program.

 

Thanks,

 

Keddy

Keddy C.
Staff Software Engineer
National Instruments
0 Kudos
Message 2 of 18
(3,045 Views)

Hi Keddy,

Thanks for your answer!

Actually my specific vi is not rellevant for the problem. Just put a time delay of 1000 ms in the aquisition while loop of the original template and the program will not reach into the logging measage loop when you push the stop button- that's what I found out..

Can you check it out in the template?

Regards,

Roey

0 Kudos
Message 3 of 18
(3,040 Views)

(It's typically considered poor form to ask people to write your example code for you, just FYI.)

 

I did open the example template, and the Acquisition Message Loop has a whole bunch of potential places to put the delay.

 

Also, please attempt to describe what you're trying to do. If I had to guess, you have 1 second delays that are adding up, leading to sync issues. Also remember that Generate Simulated Data.vi will simulate your acquisition timing.

0 Kudos
Message 4 of 18
(3,037 Views)

Hello

I'm working with Roey on this issue. We thank you for your help.

I'm adding a picture with the place of the delay we put in the acquisitions loop.

I'm also adding a picture which show you the problem you should look at

the main UI of the program.

We try to understand why adding such a delay on the acquisition loop destroy the synchronization between the loops.

We thought that the main idea of parallel loops is that each loop can work at different 

time delay without any dependency.

Best Regards 

Ofir

 

0 Kudos
Message 5 of 18
(3,016 Views)

Neither picture is much help. I've put the same wait in the default template project and don't see any issues.

 

Why are you putting that wait there anyways?

0 Kudos
Message 6 of 18
(3,010 Views)

Hi Paul,

 

Are you getting the 'Ready' measage again after pressing the stop button?

 

We put the delay in order to synchronize the acquisition to other devices in our setup. 

 

Roey

0 Kudos
Message 7 of 18
(3,004 Views)

Yes. 

 

Can you further elaborate on the synchronization requirements? Are you talking to the other devices in your program?

0 Kudos
Message 8 of 18
(3,001 Views)

Hello and thank you for your help!

Don't you see that after putting a delay in the acquisition loop the program don't return to "ready" state after you press the stop button? (compared to the basic program) .  I can send you a movie some how?

we don't really need a delay there but it is a demonstration for a problem we are trying to solve.

We are actually acquiring data from a PNA and the acquisition loop takes time which is user waveform data dependent. We try to stop the measurement by pressing stop button but we get the problem we described to

you that the state stays at "Acquiring and Logging state" and don't returned to ready.

If you put another delay of 1500ms at the logging loop inside the logging subVI you

will see that now the program returned to the "ready" state after pressing the stop button.

can you just explain this specific issue?

BR

Ofir 

 

 

0 Kudos
Message 9 of 18
(2,998 Views)

No, I dont see that. Putting a delay in the acquisition loop does not cause the issue you are describing.

 

How is anyone supposed to explain the issue, when you have not provided a means to replicate it, or all the required details? We have no idea what other modifications you have made to the template (which are most likely the cause of the problem).

 

Post your code or an example that replicates the problem.

 

 

 

0 Kudos
Message 10 of 18
(2,995 Views)