06-24-2015 11:00 AM
So basically, how do i convert the 5v i get from my analog input DAQ into a true/false ?
True = " action " will be taken
False = nothing happen
any advice pls thx
Solved! Go to Solution.
06-24-2015 11:14 AM
First you need to define an acceptable voltage range/threshold for your logic levels. The 5v sounds like TTL?? Low range is 0v-0.8V, and High range is 2v-5v, and it is undefined if the voltage is in between. Read your value from the DAQ and then compare it to your thresholds.
06-24-2015 12:15 PM
If you have a number and want to know if it is greater than another number, use the Greater? function from the comparision palette. This returns a boolean which is True or False. You can then wire that into a case selector on a case structure to do one thing or another. You can also just wire the number to the selector if you don't mind working with integers and know that the value you want to compare won't change at run time.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
06-24-2015 10:11 PM
Hey thanks for the advice , it's working already!
But i have a small problem , the readings from the input is jumping at different values so when i pass the voltage into my input , the readings from the DAQassistant will read all the readings and keep on approve the Greater than? even when i pass the voltage for like 1 second only , what i want to achieve is to have only 1 reading(when i pass the voltage) at the DAQassistant in that 1 second , so it can only be True for one time when i pass the voltage; is it possible?
sorry for my english
06-24-2015 11:08 PM
@Roamingburger wrote:
Hey thanks for the advice , it's working already!
But i have a small problem , the readings from the input is jumping at different values so when i pass the voltage into my input , the readings from the DAQassistant will read all the readings and keep on approve the Greater than? even when i pass the voltage for like 1 second only , what i want to achieve is to have only 1 reading(when i pass the voltage) at the DAQassistant in that 1 second , so it can only be True for one time when i pass the voltage; is it possible?
sorry for my english
Instead of telling us, in words, and apologizing for your (quite acceptable) English, attach your VI (there is a saying, "A Picture is Worth 1000 Words") so we can see exactly what you are doing, and can make helpful suggestions.
Bob Schor
06-25-2015 12:16 AM - edited 06-25-2015 12:16 AM
I've attached my VI.
Take a look at the DAQassistant 5, i'm trying to change it in a way that once the voltage surpassess a certain value(e.g. 1v) , the action (in the case structure) will be taken ONCE,
and it will only reset when the voltage is below 1v
Meaning that when i press a button (5v is supplied) the action will be taken only once(when i'm holding that button) , i release the button(no action taken) and press it again then the action will be taken again.
1 press = action taken once (even when holding)
right now when i'm holding the button it will keep on performing the action repeatedly
06-25-2015 05:41 AM
Sounds like a place to use the Boolean Crossing PtByPt VI. You can configure it to only give you a high value when the boolean input goes from false to true.
06-25-2015 10:18 PM
Hey crossrulz thanks for that advice , i actually managed to solve my problem with that vi.