LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do i sniff an RS232 connection and write the content to a file?

wire the selected path from the dialog express vi to the input of the file
open... Then you'll get only one dialog.


Message 11 of 26
(1,487 Views)

I've got the file part working now, thanks everyone!

 

Does anyone know what I can do about the sniffing?

0 Kudos
Message 12 of 26
(1,466 Views)
Anyway, I'v got the sniffing part working, but the read buffer keeps printing six zeroes after every read byte. What can I do about this?
0 Kudos
Message 13 of 26
(1,453 Views)
I'm supprised you ever got this to work. Usually, as soon as you do a visa
init, you can't access the comport from any other application untill you
close the visa resource.

Regards,

Wiebe.


0 Kudos
Message 14 of 26
(1,448 Views)

1. I think, it's only possible to sniff if you read the memory RX register of the port (and you have to poll it, what very increases your CPU usage), but otherways you will not be able to open the port from another application.

2. Or you should take a sniffer application and embed it to your programm.

3. May be it's possible to make that over Windows System DLL?

0 Kudos
Message 15 of 26
(1,446 Views)
The other application is running on another computer. I should have pointed this out. Sorry.
0 Kudos
Message 16 of 26
(1,441 Views)

Ah, ok. I understand now. You splitted your serial cable to two PCs, and you want use that on one PC and sniff it on other. May be you can take my RS232 terminal as example. It supports the data logging to a file:

http://www.labviewtutorial.eu/viewtopic.php?f=18&t=133

0 Kudos
Message 17 of 26
(1,440 Views)

"Tzench" <x@no.email> wrote in message
news:1226056218342-805409@exchange.ni.com...
> The other application is running on another computer. I should have
pointed this out. Sorry.

So the sniffer computer is connected to the application computer through the
serial port?



0 Kudos
Message 18 of 26
(1,427 Views)

In the present version of my VI I can sniff the data correctly and also save it to a file. I do however have difficulties converting it to a proper hexadeccimal form. I have two problems:

 

1. I get a row of zeroes after the hexadecimal number. If I increase the number of scanned bytes in the VISA

0 Kudos
Message 19 of 26
(1,421 Views)
You have to take the Write Binary File.vi instead of Write Text File.vi to save the data.
0 Kudos
Message 20 of 26
(1,415 Views)