Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Virtual serial port data to test the labview code

Hi,

I am working on a project  in which I am required to do the following:

  1. Continuously obtain data from a device over 9 pin serial port, parse them dynamically. I need to obtain data from 2 devices at the same time.
  2. Display the data in a table and be able to dynamically update if a button is pressed on the device. 

I am working on labview from a couple of days. I am trying to learn as much as possible frm the resources on Ni website. By seeing the tutorials, forums I understood that I need to use VISA for obtaining data from serial port and should use State machine and Queue message handler. Upon seeing the project templates, I noticed that Continuous measurement and logging template is similar to what I need but I am not sure.

 

And also, Can I use any software to create virtual data without having a physical device connected to a serial port.

 

Any advice is well appreciated. Thank you.

0 Kudos
Message 1 of 4
(4,771 Views)
Yes, you need to use VISA but a state machine and queued message handler are optional. It all depends on shady you need to do to the data. You cannot read from two devices at the same time over a single port. Each instrument requires it's own serial connection.

There is nothing in LabVIEW that will automatically simulate data. You can use a another (or two other) port and write data to that port.
Message 2 of 4
(4,765 Views)

Thank you for the advice. Sorry for the confusion, I did nt make it clear in my question. I have two serial ports for the two devices, however I want one lab view application to gather data from two devices using two serial port connections.

 

Can you please elaborate on how to write data to the port?

 

Thank you

0 Kudos
Message 3 of 4
(4,756 Views)
Like the example called Basic Serial Write and Read, you write with the VISA Write function. The actual data that write would depend on the instrument you are trying to simulate. What are they? Have you checked Help> Find Instrument Drivers to see if code already exists for the instruments.
0 Kudos
Message 4 of 4
(4,739 Views)