LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Generation of several signals of the different form

Solved!
Go to solution

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? 

0 Kudos
Message 1 of 6
(3,954 Views)

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 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 6
(3,943 Views)

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.

Message 3 of 6
(3,942 Views)

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 

 vi.JPG

How it is possible to correct this error? 

0 Kudos
Message 4 of 6
(3,922 Views)

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 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 5 of 6
(3,898 Views)
Solution
Accepted by topic author _Pavel_
[Edit]: Double post.....
Message Edited by Norbert B on 11-04-2009 02:34 AM
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 6
(3,896 Views)