11-03-2009 08:43 AM
Hello!As it is possible in LabView to realise the following task. There is a analog signal, a definite form which is necessary send on an analog output AO1 PCI-6221. As soon as this signal was completed, it is necessary send the following signal, the same or other form on the same output AO1. In case of usage repeatedly StartTask there will be a big time lag between signals.
How it can be made?
Solved! Go to Solution.
11-03-2009 09:14 AM
Since you are using hardware from NI (PCI 6221), i suggest you to take a look into the LabVIEW example finder.
You can find several examples on hardware input/output there including analog output. There are two major different setups:
finite generation (what you are doing)
continuous generation
So i ask you to look into the contiuous analog output examples included in the example finder.
hope this helps,
Norbert
11-03-2009 09:16 AM
Don't start and stop the task and don't enable regen mode.
Have you looked at any of the shipping examples? Cont Gen Voltage Wfm-Int Clck-Non Regeneration seems to be pretty close.
11-03-2009 12:28 PM
Thanks! It that is necessary. But I have some problem with this vi, I'm attach bmp. When I'm stop internal loop and start again, I have next problem:
Error -200293 occurred at DAQmx Write (Analog 1D DBL 1Chan NSamp).vi:3
Possible reason(s):
Measurements: The generation is not yet started, and not enough space is available in the buffer.
Configure a larger buffer, or start the generation before writing more data than will fit in the buffer.
Property: RelativeTo
Corresponding Value: Current Write Position
Property: Offset
Corresponding Value:
Property: Output.BufSize
Corresponding Value: 2000
Task Name: Stimulation
How it is possible to correct this error?
11-04-2009 02:19 AM
This is not a default example shipped with LV. Have you ever tried the default example as Dennis suggested?
The behavior you are seeing is expected and "desired".
To give you some hints:
1) Try not to stack loops in the way you did. Stacking loops is most often not a good idea.
2) First Call is the reason for the error.
3) You have to write data to the outputbuffer before starting the output. But you must only start the task one. So starting the task in a loop is (again) no good idea.\
4) Stop Task serves no purpose in your VI.
hope this helps,
Norbert
11-04-2009 02:34 AM - edited 11-04-2009 02:34 AM