Showing results for 
Search instead for 
Did you mean: 

how to measure how long the output is active

hi all, 

i want to make a vi that measures how long the output is active, i was thinking about measuring the current but that would take up more control lines and i dont want to do that.

so my question is how can i either 

1) measure how long the output is active

2) measure the current output from that channel, ie if i am outputting voltage is there a way for me to record the current output without using an additional channel


thanks all 

0 Kudos
Message 1 of 5

Hello Calman,


Can you give us more detail on the hardware you are using? (cRIO, PXI,.....) Which drivers are you using? NI-DAQmx, FPGA... This will help getting you a good answer.



Message 2 of 5

You do not give very much information so any answer will contain some guesswork.


How do you define "active"? Are you applying a voltage to an output line but only consider it active if a load draws some current?  What are the voltages and currents (both active and inactive)? How long is long?  What are the specific timing requirements? Minimum time that the output is active which must be detected? What is the maximum time that an output can remain active? Does the activity turn on and off rapidly? If so, what are the minimum and maximum on and off times?


2) I do not know of any way to measure the current that does not require an input channel. Even instruments like sourcemeters which produce and output and measure the voltage or current have separate measurement channels.



Message 3 of 5

thankyou for your reply, 

i am using the myDAQ, and so therefore the NI-DAQmx driver


i can generate the code once i have used the daq assistant, and read the voltage output from there but i cannot read the current output. 

0 Kudos
Message 4 of 5

sorry i dont usually post questions on forums.


i am activating a motor but only when it is outside of the limits, and so the current draw will be variable, i can measure the current during the calibration phase and then mulitply the voltage by the time that function has been active, but i was wondering whether or not the current itself can be measured and sourced on the same channel. 


it is basically an on off controller and therefore the switching time would be rapid, however i have saturated the input to ensure it would not switch so eratically. 


the output can remain active indefinately if outside the limits


i was just curious whether or not it was capable of measuring the current being sourced from the channel i assumed that it may have that capability since some bench powersupplies display the current output on that channel 


thanks for your responses

0 Kudos
Message 5 of 5