10-28-2015 08:10 AM
Hi,
I wonder if it is poosible to create signal states on LabVIEW? That is to say the state will define a signal between one and another threshold
Thank you
10-28-2015 09:14 AM
You're going to need to give us more information here. Do you have a device that you're using to send digital outputs with?
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
10-28-2015 09:23 AM
Ok, I record a signal from a photodiode via an acquisition card. This photodiode allow me to detect 4 levels of gray. So I'd like that each gray level corresponds to a state. Do you think it's possible?
10-28-2015 09:30 AM
Are you having problems detecting which state you are in or storing it? Do you have any code you could share to give us a better context?
10-28-2015 09:35 AM
No problem to detect them: i just have to create 3 threshold. I just want to associate each gray level to a state. For the moment i don't have code, just the VI for the record of my signal.
10-28-2015 09:41 AM - edited 10-28-2015 09:45 AM
Are you measuring an analog voltage from your sensor with some kind of DAQ card? If so you can easily compare the voltage to various ranges and see if it's within them. Have you tried just using In Range and Coerce.vi (Comparisons palette)?
EDIT: You could also get a little fancier and set up an array that represents your desired ranges and use Threshold 1D Array.vi with your sensor voltage connected to the threshold input. The output index would represent the range the voltage is within.
10-28-2015 09:43 AM - edited 10-28-2015 09:44 AM
I assume the data is coming in as a numeric value right? Take this numeric value and set up some code to compare it to your desired thresholds. The Comparison palette will help you.
You're really just asking how to use LabVIEW... I would suggest waching a few tutorials.
"Give me six hours to chop down a tree and I will spend the first four sharpening the axe." - Abraham Lincoln
Here are some free training tools primarily focused on LabVIEW and NI hardware to help get started.
-MyRIO Project Essentials Guide (lots of good simple circuits with links to youtube demonstrations)
Learn NI Training Resource Videos
6 Hour LabVIEW Introduction
Self Paced training for students
Self Paced training beginner to advanced, SSP Required
LabVIEW Wiki on Training
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
10-28-2015 09:51 AM
My problem is not to detect the gray level, my problem is to associate the 4 gray level to a state (like high state or low state, but here it will be state 1, 2, 3, 4). It aim at detecting every change of state. Datas come from the DaQ assistant
10-28-2015 09:54 AM
Yes, we get it. There are many ways to do this simple task: Case structure, In Range and Coerce, Threshold 1D Array, plain old math to scale and coerce the signal... What have you tried so far? Show us your attempt to code this...
10-28-2015 10:06 AM