LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cont Change Detect (Async)

Hi

I am using a Cont Change Detect (Async).vi came with LabVIEW 7.0 TO Detect Changes in the States of 4 Digital Line with the DIO-32-HS board and i store all data read in array.
i would like to get the timing array for every change.
i have an 6024E board connected with via RTSI to the DIO.

how can i modify the example below?
0 Kudos
Message 1 of 5
(3,037 Views)
Hi:

You can use the Get Date/ Time in Seconds VI inside the false case and use Insert into Array VI to append the time to a local variable. This way the only time the array is appended with a timestamp is when data is actually read from the DIO lines.

Please look at the code and if you have additional questions please do not hesitate to contact us back.

Regards,
Bharat Sandhu
Applications Engineer
National Instruments
Penny
0 Kudos
Message 2 of 5
(3,037 Views)
Hi

thank you for your help.
but i still have a problem!
the time array and the port data read are not the same size!
0 Kudos
Message 3 of 5
(3,037 Views)
Hi:

The arrays are probably not of the same size because of backlog. There is really no accurate way to record the time when one of lines changed if there is a backlog.

However, we can assume that the lines changed at approximately the same time and so to make the time array and port data array of the same size you can use the scan backlog output to set the for loop count. Inside for loop, you can append the time into the time array.

Please look at the attached VI.

Regards,
Bharat Sandhu
Applications Engineer
National Instruments
Penny
0 Kudos
Message 4 of 5
(3,037 Views)
Hi

the lines does not change in the same time. with your example i get a timing array bigger than the port data read array! i did'nt find any solution for that.
thank you for your help.
0 Kudos
Message 5 of 5
(3,037 Views)