bnewman
Posts: 4
Joined: Thu Dec 18, 2008 9:47 pm
Location: Canada

virtual port OnDataFromPort not firing

Thu Dec 18, 2008 9:52 pm

Hi there,

I have some C# code using the latest eval version of SerialTools to open a physical port, COM2, create a virtual port, COM4 and direct any data read on COM2 to COM4. All of the SerialTools events fire for both port and virtual port except for OnDataFromPort(). What I do is that when some data is read in on COM2, I perform the following statement:

vport.DataToPort(txtDataToPort.Text);

The statement seems to work without any errors. However, I would have expected the vport_OnDataFromPort(string data) method to be invoked. It is not firing. Strange since vport_OnOpened fires when I open the port as a regular port.

Why is this happening?

Thanks,

Brendan

User avatar
johan
GpsGate
Posts: 14372
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: virtual port OnDataFromPort not firing

Thu Dec 18, 2008 10:00 pm

OnDataFromPort will be invoked when the application connected to COM4 writes data to COM4

More info:
http://franson.com/serialtools/reference_manual.asp?class=VPort&item=OnDataFromPort&platform=net

Regards,
Johan

Franson Support

paulmelliott
Posts: 4
Joined: Wed Sep 09, 2009 1:11 pm

RE: virtual port OnDataFromPort not firing

Wed Sep 09, 2009 1:19 pm

I am using Vports (and regular ports) in a WinXP application, written with NsBasic. The serial ports work fine, both sending and receiving. The Vports will only send data.

I cannot get the Vport obj_OnDataFromPort(Data) subroutine to fire. This is set up in a similar manner to the serial ports (which do work). Sending data from another application to the Vport does nothing.

What should I be looking at?

Return to “SerialTools”