LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Register for events: Two counters

Hello,
 
i want to register events like in the attached file.
But now i want to use 2 regeistered events (with a second counter).
 
I tried different ways, but alway one counter works.
 
Does anyone know who I can do register events for 2 counters?
 
Thank you
Patrick
0 Kudos
Message 1 of 4
(2,762 Views)

in your vi you count only one counter.

could you elaborate on the other ways you tried?

as first approach, did you try to duplicate your code for the second counter (2 while loops for 2 DAQmx tasks)?
if it works, then there should be no reason why not imlpement the two tasks in the single event structure.

 

-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 2 of 4
(2,758 Views)

Hello Gabi,

i try it with two counters and 1 event counting (attachment). But it dont works.

What is here the problem?

Regards

Patrick

0 Kudos
Message 3 of 4
(2,750 Views)

First we have to make sure that you actually have 2 counters on the card, that you can listen to independently.

i suggest then that you first check each independent counter that you can actually count them.
when this step is done, we can try to independently listen to the two counters to see if it works. meaning: keep 2 while loops with 2 event structures, one for each DAQ channel.

btw, in the present vi, you do register for both tasks, however the event structure only listen to the first one. you have to create another event frame for the second task.

-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 4 of 4
(2,747 Views)