LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

loss of synchronization using notifier (LV 7.0)

Hello,

I'm using LV 7.0 and I have two while loops which I want to synchronize with a notifier. The first while loop (upper one in the pdf) reads out an digitizer card. This is code from the manufacturer of the digitizer card which I adapted to my needs. The second one reads out another device over a RS232 connection. An accidental event results in a spectrum on the digitizer card and not later than 200 ms to this event the corresponding information appears on the RS232 connection. This information is passed with a notifier to the digitizer loop so that both loops are synchronous. The program ist running fine for the first 100 events or so and after that the synchronization is lost and I get notifier timeouts. I measured the delay between the digitzer and the RS232 connection with a scope and it is always less than 200 ms. Is the usage of the notifier correct or do I have to generate and destroy the notifier inside the loop.
Can anyone help me with this problem?
Thanks
0 Kudos
Message 1 of 7
(3,868 Views)
I tried to use occurrences with a local instead of notifiers but it's still the same problem.

0 Kudos
Message 2 of 7
(3,851 Views)
Some new information: If I remove the "saveMS.vi" in the upper loop the program runs without losing the synchronization. I also measured  the time  the program needs to save the file: it is always around 50 ms, even when the program lost the synchronization.
0 Kudos
Message 3 of 7
(3,827 Views)
I'm still struggling with this problem but right now I don't know what else I could try to find the error. Can anyone help me?
0 Kudos
Message 4 of 7
(3,810 Views)
Dear asdkamps,


unfortunately it is nearly impossible to debug your project from our position. Therefore  we can't provide you a reason why your programm losses synchronization after abotu 100 cycles. Under the following link you can find the tutorials to the design pattern we suggest. I hope that will help you to debug the programm and localize the reason of the problem.

http://zone.ni.com/devzone/conceptd.nsf/webmain/5C543B5DA8E6925F86256C520052344B

Sincerly yours

Carsten Sprung
Applications Engineer
National Instruments Germany
0 Kudos
Message 5 of 7
(3,793 Views)
Hello Carsten,

thank you for your reply. I would like to ask you if the usage of "visa wait on event" and notifier is like it should be. If it is and there is no error you can see on first view, I will try to use the master/slave architecture like you suggested, although at the moment it is difficult for me to judge which process can act as the master.
0 Kudos
Message 6 of 7
(3,787 Views)
Hi asdkamps,

the idea to use notifiers to synchronize loops is good. As I wrote last time it is not possible to check your VI withou having exact knowledges about your points of view. Therefore I would like to give you some additional ressources that can provide you mor informations to be able to check your programm.

The first one is an example for VISA events

VISA Serial Events
http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3EF5B56A4E034080020E74861&p_node=DZ52363&p_source=External

The second one is an example for waiting on all notifiers.

Wait for All Notifiers
http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B500C6E7AB0422E1E034080020E74861&p_node=DZ52071&p_source=External

Additionally I want to suggest you to have a look at the NI examples that are included in LabVIEW. A good example is the "General Notifier Example". Please have a look there to get the neccessary knowledge in order to debug your project.

Best regards,

Carsten Sprung
AE, National Instruments Germany
0 Kudos
Message 7 of 7
(3,779 Views)