LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How I can automatically do offset nulling of DAQMX TASK , DAQMX EXPRESS VI

Solved!
Go to solution

Hello Respected Members
I am using 4 strain transducers attached to NI9237 C series module. I have made a State Machine that when so ever i click a button , it executes the DAQMX task(EXPRESS VI) and many Integration and Mathematical operations from the signals generated. I use Gate and Trigger Express VI to get the required amount of signals and when the data is acquired, it automatically goes to the "Wait State". 
Problem Statement: As the transducers face multiple impacts, I want Before every Impact, it should automatically null its offset.( For every impact i click the button,and it enters the state where the DAQMX EXPRESS VI Runs.....). 
Guidance Required on : How to NULL OFFSET , everytime the DAQMX TASK Express VI begins, automatically(without using the interface when we double click the icon of express vi).

Below is the snippet of the DAQMX task stated. Four Different sensors are read by this single task.

0 Kudos
Message 1 of 10
(3,963 Views)

Hi Ahmed,

 

How to NULL OFFSET , everytime the DAQMX TASK Express VI begins

Two steps:

1. Get rid of the DAQAssistent and use plain DAQmx functions as explained here and in all the example VIs coming with LabVIEW.

2. Do a reading of your channels when starting your measurement and use this reading as "OFFSET" for the next readings. You simply need to subtract that OFFSET from your other readings…

 

I have made a State Machine

That's fine!

Just add a state of "read offset" between "initialize DAQmx" and "do strain readings"…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 10
(3,930 Views)

Two steps:

1. Get rid of the DAQAssistent and use plain DAQmx functions as explained here and in all the example VIs coming with LabVIEW. Done! Using NIMAX Configured Task. 
Now i get 200279 error, i have also tried removing the big while loop and creating a small while loop around the Read VI..... Not Helping at all... Not going anywhere yet.

 

0 Kudos
Message 3 of 10
(3,904 Views)
Solution
Accepted by topic author Ahmed.Arsalan

Hi Ahmed,

 

have you tried to run an example VI on its own? (Like voltage, continuous acquisition)

They are great to learn the usage of all those DAQmx functions and to understan, how they interact…

 

On your image:

- you should set the sample rate only once before the loop

- you should start the task only once before the loop

- you need to read the DAQmx data without an additional wait (or very slow computation) in the loop

- the error message says "you have been to slow with read the next block of data"! (You surely got the error -200279, don't you?)

 

Simple example of steps to take:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 10
(3,901 Views)

Thanks GerdW.
Now can you guide me using of the null offset vi of all the 4 strain tasks.

I am attaching a snippet of present situation. 

Thanks Alot for your kind help

Regards

Ahmed

0 Kudos
Message 5 of 10
(3,885 Views)

Sorry for the bad snipp

the correct snipp

0 Kudos
Message 6 of 10
(3,883 Views)

Hi Ahmed,

 

Now can you guide me using of the null offset vi of all the 4 strain tasks.

I already guided you with this snippet above.

How should I help you with your images? Should I use Paint to draw in them? Why don't you attach your VI?

Btw. there's just one task in the image, not 4 of them…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 7 of 10
(3,881 Views)

Respected Sir, 

I am talking about the DAQMx Perform Bridge Offset Nulling Calibration.vi. It requires the input of channels. Kindly guide me about the channels please. I want to use this vi, as i can have values in negative as well. Minus Minus add and the error is doubled now.... 
About the Task, Yes its a single task configured in NIMAX having 4 sensors. attaching a pic.

About the VI, Sure i can send you the complete 2MB VI. But it will take alot of time to understand it sir, I am a Civil Engineer and made this VI with the Very Very Basic Knowledge of LV. Thats why perhaps i m troubling a KNIGHT
Thanks alot GerdW. 

0 Kudos
Message 8 of 10
(3,878 Views)

Hi Ahmed,

 

I am talking about the DAQMx Perform Bridge Offset Nulling Calibration.vi. It requires the input of channels

It only requires to name the channels when there are channels in the task which are NOT bridge-type sensors! By default all channels in the task get "offset calibrated".

Did you read the help for this function?

Sure i can send you the complete 2MB VI.

You may use ZIP to compress the file for upload…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 9 of 10
(3,875 Views)

Thanks alot sir. I have read the manual of vi now. Previously i had more focused on the connection descriptions... my bad. apologies.

 

presently i am on mobile, i will surely send you the vi.

 

 

regards

Ahmed 

0 Kudos
Message 10 of 10
(3,873 Views)