LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to do the derivative of a numeric signal obtained from serial comunication

Hello guys. I'm really new at this and i have problems with data type. So I'm reading a sensor with an arduino and getting the data to labview and i wanna plot the derivative and I have the function Derivative x (t) but it seems to me that i cant just wire the numeric input i have into the function. Could you help me to process the numbers into the correct data type to make the derivation work???

0 Kudos
Message 1 of 3
(3,123 Views)

Think about the derivative (and how you might estimate it from a graph) -- it comes down to something "like" a slope, the difference between two Y points separated by some delta-t (delta-Y/delta-t).  From a single point, you can't define a derivative, but from a point and previous points, you can.

 

Have you looked in the LabVIEW Help and LabVIEW Examples for "Derivative"?  It might give you some ideas.

 

Bob Schor

0 Kudos
Message 2 of 3
(3,102 Views)

I think we first need to tackle your serial communications.  What exactly is the data you are sending over your serial and how is it formatted?

 

Judging by the rest of your code, you should not use the Bytes At Port.  Instead, just tell the VISA Read to read more bytes that the longest your single message could be.  The read will stop with the termination character, which is currently set for a Line Feed (0xA).

 

Then you should use Spreadsheet String To Array to parse the comma delimited data.

 

To give any more help, we need a good definition of what the data actually is.


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 3 of 3
(3,097 Views)