LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Compare two analog signals.

Solved!
Go to solution

How do I compare an analog signal to another analog signal to see which signal has a higher value? I want to display the result on the front panel using an LED indicator. 

0 Kudos
Message 1 of 11
(5,107 Views)

How are you gettign the signals? WHat do the signals look like? What are you tring to compair?

 

You need to give us more infomation and posting your code would not hurt either.

Tim
GHSP
0 Kudos
Message 2 of 11
(5,104 Views)

Sorry about the lack of inforomation.

I have photodiode voltage four output signals go into the SCC-68 module. The SCC-68 module is hooked up to the PCI 6224 M DAQ Card.

The signals have almost no noise to them, and I am trying to compare the value (voltage) of two analog inputs to see which value is higher. I want to compare the analog inputs of QPD 1.1 & QPD 1.2 from the VI below.

 

 

0 Kudos
Message 3 of 11
(5,098 Views)
Solution
Accepted by topic author AARON Y

This will do a simple comparison of A > B. If your code gets more complicated eventually you need to have a producer consumer system in place. You can find examples of this in the shipped examples.

 

Here is a sample:

Example.png

Tim
GHSP
0 Kudos
Message 4 of 11
(5,087 Views)

Hi Tim,

 

I noticed you changed the express to its DAQmx components, does this make it easier than having to convert the dynamic data type?  Just wondering, maybe this was personal preference.

-------
Mark Ramsdale
-------
0 Kudos
Message 5 of 11
(5,081 Views)

It will make it much faster. You do not have to start and stop the data acquisition every time the loop executes. This will also get rid of the dynamic data type so you do not have to do the conversions.

Tim
GHSP
0 Kudos
Message 6 of 11
(5,077 Views)

When you start getting into more complex code that needs to be fast you will not be able to use the assistants any more. I would recommend that you start getting used to not using them and learn how to make this systems yourself if you plan on doing real programming for a long time. If this is just a hobby or you are only going to do programming once a year or so then you could continue to use these but they are really for beginners that do not know better.

Tim
GHSP
0 Kudos
Message 7 of 11
(5,075 Views)

Thanks,

 

I don't use assistants myself, it's always seemed a pain to convert from DDT.

-------
Mark Ramsdale
-------
0 Kudos
Message 8 of 11
(5,070 Views)

So did any of what I did help?

Tim
GHSP
0 Kudos
Message 9 of 11
(5,066 Views)

I am currently trying to get up to speed on using the DAQ.mx through the NI tutorial information.

My main problems are:

1) I do not know how to add multiple physical analog input channels because the DAQ.mx Channel Create only allows you to input one channel of data (such as ai1). I am guessing you use some sort of counter to input each peice of data in like a multiplexer?

2) I do not know where the "dbl" or "MEAN" functions are on the function palette.

0 Kudos
Message 10 of 11
(5,059 Views)