LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Continuous waveform adjustment

 The example Cont Gen Voltage Wfm-Int Clk.vi, how can the output assume the new input parameters without stop and restart the vi?

 

I tried a while loop over the whole design, also tried just before the task done while block, no luck.

 

I would have used the Function Waveform Generation.vi but the frequency is way off and any Windows activity disrupts the output.

 

Thanks

 

 

 

0 Kudos
Message 1 of 7
(3,309 Views)
Instead of putting a while loop across the whole VI, put a DAQmx write VI in a case structure inside the current while loop. Whenever there is a change in value update the enable this case which will write the new waveform to the AO buffer.
------

"A VI inside a Class is worth hundreds in the bush"
യവന്‍ പുലിയാണു കേട്ടാ!!!
0 Kudos
Message 2 of 7
(3,290 Views)

Thanks

 

There is only one while loop, which monitors the stop button then performs DAQmx task/channel cleanup. Without a while loop on the controls, there is no way to sense the change. Also while loop enclosing the create channel block is not correct, I suspect this was the reason for the lockup.

 

How do I update a variable outside the while loop? For example, put all the controls inside a while loop so they are always polled. Any changes set a flag outside the while loop, then as you suggested, to enable a case structure.

 

I am a newbie, need more guidance. Thanks

0 Kudos
Message 3 of 7
(3,267 Views)
Look into modifying the Cont Gen Voltage Wfm-Int Clk-Non Regeneration example by placing the Waveform Type/frequency/Amplitude controls inside the loop.
Message 4 of 7
(3,257 Views)

I modified Cont Gen Voltage Wfm-Int Clk-Non Regeneration.vi to include 2 analog outputs. I kept getting Error -200018 randomly. I tried different sample frequency and buffer size and regeneration and non regeneration; still the same problem. I called tech support, unable to resolve it. I am using the USB6212 device.

 

I had to create a channel task to include two analog outputs because I could not open two physical channels on the same device and this was confirmed on the forum. The front end is the same as Wfm-Int Clk-Non Regeneration.vi except opening a single physical channel vs. opening a channel task containing two physical channels.

 

The unmodified Wfm-Int Clk-Non Regeneration.vi example will eventually prompt the same error if I kept the mouse down and kept dragging the vi around. My version happened even when Windows was idle, the Error -200018 popped up randomly.

 

Error -200018 showed less on 10Hz and 1Hz signals and very dependent on the Fs and buffer size. The target frequency is 0.1Hz, Error -200018 showed up very often.

 

Is this a limitation of Windows and USB?

I spent two days to troubleshoot this! Can someone please help. Thanks

I included the vi and the error. I am running Labview 8.5.

 

Download All
0 Kudos
Message 5 of 7
(3,206 Views)
Any suggestions to resolve the Error -200018 problem??? Thanks
0 Kudos
Message 6 of 7
(3,170 Views)

Hi Whisper1,

 

In your VI where you are using the DAQmx channel property nod, you are using the regenerative function in non-regenration mode and that has been found to cause error 200018 in several other cases. The data acquisitionis slower in the USB and therefore, allowing regeneration lets the system keep overwriting data till it receives new data. In the non-regeneration mode, it does not find data during all reads and so errors out. Hope this helps.

 

Ipshita C.

 

 

National Instruments
Applications Engineer
Message 7 of 7
(3,151 Views)