LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Continuous generation and acquisition.

Hi all,
I have a problem and need advice. In my project (in LabView 7.1), I need the following:
1-read analog signal into a dynamic 1kHz (minimum of two channels)
2-evaluate the measured data, PI regulator used for control, and other ...
3-generate action sinusoidal signal (for actuator) to 1 kHz with variable frequency and amplitude

All through the DAQ card NI-DAQ 6052E. In the attachment is the testing program, which I try setup DAQ
card. In my project is the same code for handling the card, but many further code in the loop for read
and write to card. For my requirements testing program works, but if I use this setting in my project
is there error -200018 or warning 200015. I tried different settings without success. Can somebody
please advise?

 I thank you for your advices.

0 Kudos
Message 1 of 5
(3,813 Views)

Hi Cagik,

1. What do you mean PI Regulator?

2. Is the output  supposed to be the analog input after processing? Is the output in some way synchronized to or related to the input?

3. Lastly, to make sure I understand, the errors appear when you all the attached VI's code into your main application? From everything I found, the warning appears when you try to update the data values of an output task that is already running. I will take a look at your VI and see if I can't find something that works.

Regards,

Mallori M.

Mallori M
National Instruments
Sr Group Manager, Education Services

ni.com/training
0 Kudos
Message 2 of 5
(3,779 Views)
Thank you for your response,
1. PI regulator = PI controller, respectively PID controller where D = 0 (sorry for unenglish "regulator")
2. Output can not be synchronized with the entry, it is sufficient to read the input, calculated action variable and write it on output.
3. I am not attached TestProgram.vi to my project is only for testing the DAQ card. In my project is to use the same operating DAQ and the same settings. If this will help send the project START.zip but i fear is that you have confessed that. Thank you.

(I need to drive acceleration of sinusoidal vibration on shaker, which is dominated by analogue output DAQ card (sinusoidal wave up to 1kHz with variable frequency and amplitude), the driven value is the acceleration of the accelerometer. For controll should suffice PI controller, the low frequencies, the above-mentioned errors not happen.)



Regards

JC
0 Kudos
Message 3 of 5
(3,754 Views)
Hi,
I found a partial solution. For channel output, I set the DAQmx Channel property-> Analog output-> General properties-> Advanced-> Data transfer and memory-> Data transfer mechanism-> Interrupt instead of DMA. Error -200018 is not already, warning 200015 is still here, but at the end of the programme (to me do not mind). Smiley Happy

JC
0 Kudos
Message 4 of 5
(3,694 Views)
Hello Cagik,

Thanks for your post back!

Glad to hear you were able to get rid of the error you were seeing. I want to address the warning 200015 that you are seeing. It looks like this happens when your buffer size is too small for all the new data to be written so you end up witting some of the old data in the buffer. One way you can fix this is to use a DAQmx write property node that will allow you to set the regeneration mode. If you set this mode to Do not allow regeneration then the card will never regenerate old data just new data and you will no longer see the warning. However this could still give you a problem and miss samples. I would encourage you to look in the DAQmx help and search for Glitching. It talks about what is happening and a few steps to solve the warning that you are receiving. Please post back if you have any other questions and have a great day!

Cheers!

Corby_B
http://www.ni.com/support
0 Kudos
Message 5 of 5
(3,665 Views)