LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create signal states

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

0 Kudos
Message 1 of 14
(3,371 Views)

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>   ---'


0 Kudos
Message 2 of 14
(3,354 Views)

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?

0 Kudos
Message 3 of 14
(3,342 Views)

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?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 14
(3,338 Views)

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.

0 Kudos
Message 5 of 14
(3,330 Views)

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.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 6 of 14
(3,324 Views)

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.

Out on the range.png

 

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.

NI Learning Center

NI Getting Started

-Hardware Basics

-MyRIO Project Essentials Guide (lots of good simple circuits with links to youtube demonstrations)

-LabVEW Basics

-DAQ Application Tutorials

-cRIO Developer's Guide

Learn NI Training Resource Videos

3 Hour LabVIEW Introduction

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>   ---'


0 Kudos
Message 7 of 14
(3,317 Views)

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

0 Kudos
Message 8 of 14
(3,305 Views)

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...

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 9 of 14
(3,300 Views)
If you are using the DAQ Assistant, the first thing to do is convert the evil dynamic data to something real.
0 Kudos
Message 10 of 14
(3,290 Views)