LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

state machine and daq

Hi,

 

I am trying to prepare a VI that is capable of acquiring, analysing, and recording the results via a state machine but there is someting wrong about acquisition state. I intended to acquire 2 different signals, one of them is temperature and the other is amper. Temperature is acquired precisely but the ampera is not. What could the problem is here?

Egemen
0 Kudos
Message 1 of 10
(3,281 Views)

You need to have both of your channels in a single task.

---------------------
Patrick Allen: FunctionalityUnlimited.ca
0 Kudos
Message 2 of 10
(3,267 Views)

Since you are only reading a single value, I don't see a reason to use the start and stop DAQmx task VIs.  Just use the read (it will take care of it all for you).  That might clear some things up.

 

Another thing I noticed is that you are not closing out your log files.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 10
(3,260 Views)

Actually, I do not understand what you meant whit gathering channels in one task.. Could you explain it explicitly?

Egemen
0 Kudos
Message 4 of 10
(3,256 Views)

Yes I have forgotten to close them. I fixed it. Thanks. And also I delete the start and stop functions and it works as it has done before.

Egemen
0 Kudos
Message 5 of 10
(3,255 Views)

@pallen wrote:

You need to have both of your channels in a single task.


I could not still handle with it. What do you mean with a single task? I need to acquire 2 anlaog signals from different modules of a compact daq. How could I do it in single task?

Egemen
0 Kudos
Message 6 of 10
(3,240 Views)

Hi Egemen,

 

There's an example that illustrates what I'm describing. 

 

\National Instruments\LabVIEW 2012\examples\DAQmx\Synchronization\Analog Input - Voltage and Thermocouple in a Single Task.vi

 

Or, you can open the Examle Finder and type "Input".  There should be an example called, "Analog Input - Voltage and Thermocouple in a Single Task.vi"

 

 

---------------------
Patrick Allen: FunctionalityUnlimited.ca
0 Kudos
Message 7 of 10
(3,226 Views)

Hi Patrick,

 

Thank you for your response but I have Labview 2009 SP. I search to find an example something like you mentioned but I have not found it. Also the case that I am trying to constitute is not synchronization of analog input and analo output. Both of signals are analog inputs. Could you send the example (saved as for 2009 SP1 version) to me ? Thanks in advance.

Egemen
0 Kudos
Message 8 of 10
(3,219 Views)

Hi again Patrick,

 

I found something about multi measurements and attached the snippet. Did you mean something like that?

Egemen
0 Kudos
Message 9 of 10
(3,200 Views)

@newbieeng wrote:

Hi again Patrick,

 

I found something about multi measurements and attached the snippet. Did you mean something like that?


Yes.  That is what you should be doing.  Then for the read, you need to select multiple channels.  The result will be an array, so you will need to index the values out.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 10 of 10
(3,168 Views)