LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to link an analog input to a controller implemented in PC(Labview) then feedback to the external system?

Atten : Jeff or anyone 😃

I had discretized my controller onto labview. And would like to feed the analog input from external into the PC(that the controller is implemented in). I do hv a DAQ card. The problem is I do not know how to link the analog input -> ADC -> controller -> DAC -> system. And i really believe labview hv functions to do it. But really confuse how should i do it. Could anyone pls advise me. Thanks
0 Kudos
Message 1 of 4
(2,413 Views)
How fast are you acquiring your analog data? (How fast does the "wrap-around" from A/D to D/A have to occur?)

Mark
0 Kudos
Message 2 of 4
(2,413 Views)
Before i answer your question (seriously, i'm not sure)
, i will look up first. But just to ask you an important question.

I have send the analog data through the DAQ board then to the PC. And in labview, these data are collected into array (if i'm right). As i'm interested in one of the channel which is determine by the data column. So i use the Labview function to extract that column. Follow by extract bit by bit of the column and feed into the controller. I do hv some output from the controller. Then i want these output to be send back to the channel (DAC).

What i hv done is collect these data and put into an array then try to send back to the channel. So my problem is to send back these data back to the channel.

Can you pls advise me. I hv st
uck at these part for quite sometime already. Thanks.
0 Kudos
Message 3 of 4
(2,413 Views)
Darren,

You have answered my question. I was wondering whether you were doing single point (non-buffered) analog input, or multipoint (buffered) acquisition. Seems you are doing the latter.

I'll offer answers to both, however, and I'll start with single point. If you have a single point of data that you'd like to output on a DAC, use the Functions->Data Acquisition->Analog Output->AO Update Channel. You can wire your data right into this VI, and it will update the channel.

If you have an array of data that you'd like to send out on the DAC, you can use the Functions->Data Acquisition->Analog Output->AO Generate Waveform. This VI is similar to the former, but you tell it the DAC you want to update, the update rate (samples per sec
ond), and the array of samples you want it to update with.

In LV5.X, the input is an array of samples; in LV6i, it's an array of waveforms. Therefore, you'll have to change your array to a waveform. Do this by selecting the Functions->Waveform->Build Waveform VI. Stretch the output down, and another input will show up (dt). Wire your array to the squiggly line input. Wire a 0 to the t0, and 1/scan rate into dt. Then wire this output to the AO Generate Waveform VI.

Hope this helps.

Mark
0 Kudos
Message 4 of 4
(2,413 Views)