LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read from both load cell and accelerometer

Solved!
Go to solution

Hi,

 

I'm trying to collect data from both load cell (which doesn't need excitation) and accelerometer (which needs 4 mA excitation). As you can see below, I wrote a simple program to collect data from both devices. However, my program provides 4 mA of excitation to all channels, one of which shouldn't receive any current. How can I selectively provide the excitation to specific channels?

Any suggestions?

 

 

untitled.JPG

0 Kudos
Message 1 of 8
(3,556 Views)
The way I usually handel this is to set up virtual channels in NiMAX. You can set up each channel for what you want and then call them in your program.
Tim
GHSP
Message 2 of 8
(3,534 Views)

you can create a task, then create an accelerometer channel (polymorphic version of create AI channel) then create  the load cell virtual channel on same task (voltage with custom scale?) you can then set the rate and start the task, and read 2d array (or array of waveforms).

 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 3 of 8
(3,527 Views)

Good morning jeongho20000,

 

Both aeastat and falkpl have provided excellent solutions for this.  I also wanted to mention a good KnowledgeBase article found at ni.com by searching for "daqmx channel same task" in the internal search bar.  This helps to outline both solutions.  After searching, you can then select multiple entries, but the best that I found was the 3rd choice, titled: Using Different Types of DAQmx Global Channels in the Same Task. 

 

You can download from the article the attached example VI titled Multiple Channels Created.vi, and modify the block diagram to fit your needs.  Wiring the Task Out to the Task In of two DAQmxCreateChannel VIs is the programmatic equivalent of adding multiple Global Virtual Channels created in Measurement and Automation Explorer (MAX) to a common Task in MAX.  Either method works, it is only a user preference.  Feel free to reply if you need further clarification/explanation. 

 

Best,

Message Edited by cyclone2k9 on 04-06-2010 11:08 AM
Message Edited by cyclone2k9 on 04-06-2010 11:09 AM
Adam
Academic Product Manager
National Intruments
Message 4 of 8
(3,517 Views)

Hi,

 

Thanks for all the helpful advices which lead me to better understanding.

 

I've modified my program based on your advices as seen below, but I'm not sure if my property node is correctly set up such that the excitation is only applied to accelerometer task.

I was trying to connect the "task-out" of property node to the "task-in" of the next DAQmx creat channel, but the excitation seems to be applied to load cell as well, which is not desired.

    

Could you give me some feedbacks on mine or suggestions?

 

Thanks in advance.

 

Best,

Jay

0 Kudos
Message 5 of 8
(3,497 Views)

Sorry for missing the attachment

 

untitled.JPG

0 Kudos
Message 6 of 8
(3,496 Views)
Solution
Accepted by topic author jeongho20000

No, you did not do what was suggested. Click on the polymorphic selector right below the icon Or, right click on the Create Channel and do a Select Type.

 

 

Message Edited by Dennis Knutson on 04-06-2010 12:53 PM
Message 7 of 8
(3,491 Views)

Hallo

I have same problem with you. Is this problem solved? 

Can you give me the labview program? Because i still confused how to solve it. 

 

best regards,

Hazim

0 Kudos
Message 8 of 8
(2,779 Views)