DASYLab

cancel
Showing results for 
Search instead for 
Did you mean: 

Read Data (ASCII) and send to analog output

Are you sure, that you need to output continuous data that fast? 100 Hz with blocksize greater than 1?

 

For worksheets of (very) low complexity it might be a viable solution to switch back to a timebase setting with a blocksize of 1.

Then you need to set the AO tasks in MAX to "1 sample (on demand)".

This (a)voids the timing issues of continuous outputs with a "Read" module as source.

 

M.Sc. Holger Wons | measX GmbH&Co. KG, Mönchengladbach, Germany | DASYLab, DIAdem, LabView --- Support, Projects, Training | Platinum NI Alliance Partner | www.measx.com
0 Kudos
Message 11 of 13
(2,849 Views)

Thank you for your reply! - The data, read from the ascii file, needs to be sent to the analog output, which feeds a force control loop. To get a good control performance, 100Hz output rate should be the minimum (test frequency is around 3Hz).

 

Note: The AI task shows all feedback signals from the control loops (load cells). Those signals shall be displayed together with the command signals (AO) on the same diagram.

 

If I set in the AO task "1 sample (on demand)" and the module "read file" is synchronized by the AI task, the generated output is not continuously (staircase-shaped), measured by a scope.

 

Or did I missunderstood your advice?

 

Regards

Samuel

 

 

0 Kudos
Message 12 of 13
(2,845 Views)

Hmm, ok, an output per sample does not work, if the AO DAQmx module receives blocks with a size beyond 1.

The AO task (1 sample on demand) outputs the last value of received blocks only -- regardless of the size of the received block. Other values of the block are discarded.

 

So, either you tell the Read module to output the data from the file with 100 Hz BG 1, or you insert a "data window" module (signal analysis) in front of the AO module: set the blocksize to 1. So one block of size 100 comes in, a hundred blocks of size 1 come out. This does not work well with too fast data, but 100 Hz should work.

 

Well, kind of dirty worksheet hacking, and data stream bending, but if it works... have a good trip by "wayne-train". 😉

M.Sc. Holger Wons | measX GmbH&Co. KG, Mönchengladbach, Germany | DASYLab, DIAdem, LabView --- Support, Projects, Training | Platinum NI Alliance Partner | www.measx.com
0 Kudos
Message 13 of 13
(2,842 Views)