LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial Device with LabVIEW

Afternoon, all!

 

I'm using a Thornton M300 device that doesn't have drivers in LabVIEW.  The two questions I have are...

 

1)  How does one program drivers for LabVIEW?  What information would I need, and how difficult is it?  

2)  The Thornton M300 device allows serial communication via RS232.  I've used some COM serial communication program to just output data serial and collect in Excel.  With this logic, the device should be able to send serial data and LabVIEW could just read it without needing drivers, correct?

 

Please advise.

 

What I want to do is take the signal from this meter, and then show them graphically using gauges on LabVIEW (on the front panel view).

0 Kudos
Message 1 of 5
(2,341 Views)

Look in the LabVIEW Examples (Help->Find Examples) for Simple Serial.vi.  It will quickly show you how to use the VISA interface for talking over the RS-232 bus.  You can then just build up VIs that send the commands and data you need and read back.


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 2 of 5
(2,333 Views)

1)  How does one program drivers for LabVIEW?

Start here

Instrument drivers are actually not hard to develop at all.  Developing a good driver requires a bit of knowledge about what a driver is though.  And of course some information from the manufaturer about the list of commands you can send it and what the responses are.  This key information seems to be sorely lacking on the MT website.  In this case the manual says "

Capture.PNG

but nothing else! so, you will need to either reverse engineer the device capabilities or tell MT to get there heads out of there and provide some additional documentation. 

 

They have a form for that right here

 

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 5
(2,322 Views)

I reviewed the Example titled "Continuous Read and Write".

 

The next question I have is, how do I get the individual parameters from the return?  So, the reading is made up of strings.  For example, it would be "TEMP,25,C,etc."

 

I want to be able to take "TEMP" out and put it somewhere.  I also want to be able to take the 25 and put it to a gauge as a reading.

0 Kudos
Message 4 of 5
(2,247 Views)

Do you have an exact specification of how the data is formatted?  Does it use a termination character (like an End Of Line)?

 

First, you need to make sure you have a full message.  If the device uses a termination character, then use that and set the number of bytes to read in the VISA Read to something a lot larger than you expect to read.  It will stop when it finds the termination character.

 

From there, it looks like you just have a comma separated value string.  Try using the Spreadsheet String To Array function with a comma as the delimiter.  You can then use Index Array to pick off the values you care about to feed them to wherever you need them.


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 5 of 5
(2,232 Views)