04-25-2014 02:40 PM
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).
04-25-2014 02:51 PM
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.
04-25-2014 03:12 PM
1) How does one program drivers for LabVIEW?
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 "
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
05-01-2014 01:37 PM
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.
05-01-2014 03:11 PM
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.