Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Monitoring Serial Communicat​ion Between 2 devices

Hello,

 

I am using 2 serial datatap to monitor communication between 2 devices. I know the communication protocol so I know what is being sent/received. Normally, I would use hypterterminal to monitor and capture communication and then open the captured file to decode. However, I would like to create a labview program to monitor the data and translate the protocol as the devices are talking to each other. This will help me identify which devices is sending the incorrect information. What would be the best way to accomplish this?

0 Kudos
Message 1 of 6
(3,172 Views)

Newguy100,

 

There are many ways to accomplish this using Labview. First, you can get satered with gathering the information/data by using some of the serial examples with labview. You can find these in labview's example finder>>Hardware IO>>Serial. 

 

Once you have the information out, if you know what bytes translate to what information, you can use  "find and replace" blocks on the string for the various different information. 

 

Regards,

 

Kyle Mozdzyn

Applications Engineering

National Instruments

Regards,

Kyle M.
Applications Engineering
National Instruments
0 Kudos
Message 2 of 6
(3,147 Views)

It does not sound like the send/receive is actually being done in LabVIEW. It sound like the poster has these two devices talking to each other (perhaps via some third-party app), and wants to monitor what's being sent over the serial port. If that's the case, then you essentially need to attach the LabVIEW process to the serial port driver in order to capture the serial port messages. While this can be done, unless this is a learning exercise, you are far better off using something that already exists, such as Portmon.

0 Kudos
Message 3 of 6
(3,145 Views)

Smercurio,

 

I was under the impression that a datatap was essentially a serial splitter, which should be treated as any other serial read which he would be using to monitor and translate the signal. Please correct me if Im wrong though. 

 

Regards,

 

Kyle Mozdzyn

Applications Engineering

National Instruments

Regards,

Kyle M.
Applications Engineering
National Instruments
0 Kudos
Message 4 of 6
(3,135 Views)

Could be right. Not really sure. We need to get clarification from the poster.

0 Kudos
Message 5 of 6
(3,129 Views)

Kyle is correct. I have a three prong datatap where each one end is connected to the slave device and the other end is connected to the host device. The third port is connected to the PC where I can monitor communication between the 2 devices. I wanted to see what the best option was to read the serial port. I am use to using while loops but I found some examples where it can be done using event structures. Hope this is not too confusing.

0 Kudos
Message 6 of 6
(3,113 Views)