LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

does any one knows how to send commands to serial port and read data from there? Fo example i want to read data from the mass balance connected to pC using labview

I am currently masuring the mass loss on the conbustion. so i have to read data from the mass balace connected to the PC on the serial port.My problem is how can I send command from labview to the serial port and read the data i want.
Also is there any possiblity to integrate this VI with another one let us say VI for temperature so that i can readt all data at the same time.
Any example or typical application will be appreciated
0 Kudos
Message 1 of 7
(3,273 Views)
The VISA commands should be able to do this fairly easily.  In LV8.0, they can be found on Instrument I/O >> VISA pallette.  You can look for the "Basic Serial Write and Read.vi" in the examples.
0 Kudos
Message 2 of 7
(3,259 Views)

I would suggest you start with the shipping examples. Go to Help>Find Examples and from the Search tab, enter serial. You'll find a couple of different examples (depending on your version of LabVIEW). You also have the option of using the Instrument I/O Assistant if you have version 7.0 or higher. You will need the programming manual from the vendor of the balance. You should also do a search at http://www.ni.com/devzone/idnet/default.htm to see whether a driver already exists for your instrument.

Doing tasks in parallel is easily done in LabVIEW. Again, you should check the shipping examples. The simplest way is with two separate while loops.

Message 3 of 7
(3,253 Views)
Thank you very much for your quick responses.
Currently am using version 5.1 but should upgrade to version 7 soon.
for the suggestion about the VISA do the commands different from those applied on the Hyperterminal or I have to use the same commands
 
0 Kudos
Message 4 of 7
(3,246 Views)
The commands you send with a VISA Write are exactly the same as what you would type in Hyperterminal. The difference is that when you use Hyperterminal, it will automatically append termination characters (Carriage Return/Line Feed) to the end of each command. This is what happens when you hit the Enter key in Hyperterminal. When you write your LabVIEW program, you have to add this to your code.
0 Kudos
Message 5 of 7
(3,239 Views)
Dennis,
thank you ver much for the advise, I used VISA and i can now send command and read data.
my question now is how do I send data to log files or save them to files.
And another thing is is it possible to intergrate this VI with another one let us say VI for temperature and run them at the same time ?
0 Kudos
Message 6 of 7
(3,214 Views)
You have the entire File I/O palette that is for writing/reading data to files. You also have a lot of shipping examples that do exactly that.
 
Yes, you can do parallel tasks in LabVIEW. Like I said it is easily doen with two separate while loops.
0 Kudos
Message 7 of 7
(3,205 Views)