LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can someone explain weird results from AO-WRITE ?

I'm new at AO. Eventually I want to do synchronized AI/AO on a PCI RT board, for now I'm experimenting.
I'm using the classic VIs, apparently the RT board won't support DAQ-mx (???)

I use the following sequence for continuous output. Each output is computed and written BEFORE the clock tick that causes it to change the D/A output.

AO-CONFIG (channels = 0,1) (Buffer size = 2)
AO-WRITE (data = 1 row x 2 columns, Allow Regen = FALSE)
AO-WRITE (data = 1 row x 2 columns, Allow Regen = FALSE)
--- the buffer should be full now.
AO-START (Update rate = 50 Hz) (Number of iterations = 0)
repeat
change data (still 1 row x 2 columns)
AO-WRITE (new data) (Allow Regen = FALSE)Timeout = 1.1 / Rate
until Error, or STO
P button.
AO-CLEAR
REPORT error.

I want to use the NUMBER OF BUFFERS DONE and NUMBER OF UPDATES DONE outputs from AO-WRITE to determine my timing, and how many updates per second I am actually getting. (Ideally, I would like to query the buffer, write a value if I need to, and do something else otherwise, but I do not see how to do that).

The trouble is, the NUMBER OF BUFFERS DONE output starts with the number 129. I don't know why. If I display it after the first WRITEs (before starting the task), it displays 0. But the one inside the loop (after starting the task) starts at 129, and then climbs every two loops.

Why is that?
Can I depend on it in future versions? or is it a bug?
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 1 of 2
(2,522 Views)
Hello,

DAQmx support was added for LabVIEW RT targets as of LabVIEW 7.1: http://www.ni.com/realtime/features_and_related_products.htm

Regards,
Bill B
0 Kudos
Message 2 of 2
(2,522 Views)