08-15-2019 03:24 PM
@chen3477 wrote:
I add a waiting time because I found it couldn't produce array one-by-one. Now it can create in a sequence like 0.001, 0.002 and without a time delay it can't work at the regular interval of 0.001. I don't know why.
Timing is separate from data. your statement makes no sense at all. Without timing, it happens so fat that all you see is the final result.
08-15-2019 03:33 PM
My desire is to create a 1000-dimension array. The first 700 elements add from 0 up to 1 and the later 300 decrease from 1 to 0.
08-15-2019 03:38 PM
08-15-2019 03:48 PM
Yeah I do find the ramp pattern. I need to output the analog voltage signal via DAQ but I don't know how to connect the ramp pattern with the DAQ.
08-16-2019 12:32 AM
Simple example with on-demand timing (you probably don't want this, but it at least points you in a direction for:
@chen3477 wrote:
I need to output the analog voltage signal via DAQ but I don't know how to connect the ramp pattern with the DAQ.
Is that basically what you want?
08-16-2019 08:30 AM
Exactly! Thanks! But I wonder how can I control the frequency since there is not a time loop structure? And I found some data was missing or delayed.
08-16-2019 08:48 AM
Put a while loop around the For loop in cbuther's code and do NOT use the continuous run button.
Ben
08-16-2019 10:42 AM
@chen3477 wrote:
Exactly! Thanks! But I wonder how can I control the frequency since there is not a time loop structure? And I found some data was missing or delayed.
Because after each segment, you are configuring the IO from scratch, which takes time of course. Can't you give it the entire array of N samples and use continuous hardware-timed output? If course, as Ben already said, only the inner daq part should be repeated, not the entire code. Look at the shipping examples.
08-16-2019 10:56 AM
@altenbach wrote:
A RT target does not have a UI, so an event structure is useless.
Bit of a sidetrack here, but couldn't you use the event structure for User Events and DAQmx Events on a RT system? (I never do any RT programming, but I assumed those use cases would work in RT)
08-16-2019 11:01 AM - edited 08-16-2019 11:12 AM
@BertMcMahan wrote:
@altenbach wrote:
A RT target does not have a UI, so an event structure is useless.
Bit of a sidetrack here, but couldn't you use the event structure for User Events and DAQmx Events on a RT system? (I never do any RT programming, but I assumed those use cases would work in RT)
You are correct.
So for anyone keeping score that brings Christian up 2 when we recall he once posted "1 can not be represented in binary."
Ben