08-01-2012 04:55 AM
Hello.
I created a VI to check if my serial port is well configured,
the way I use to read the serial port in this VI is the one I use in my main program.
The problem is that the VI miss many events ( mouse event of another computer).
I do not understand the problem ...
I post my VI, I am aware that how I manages the appearance of the text is very bad but it works :).
Thanks
08-01-2012 05:13 AM
Hi demum,
you miss events of another computer? How do you even plan to recognize them?
Hints:
- You can configure the VISA timeout at InitSerialPort, no need for an additional property node.
- While loops running just once with out any shift register are quite senseless.
- placing your event structure inside a while loop inside your big while loop seems "interesting", but still wrong to me...
08-01-2012 06:35 AM
Hi GerdW
Thank for tips about time out, about the while loop, you're right i just delete it thanks(to much case structure today ><).
About the shift register :
The loop is here because i want the possibility to stop the timeout of visa , the only solution i found is to divide the timeout and to read the serial port in a loop. In my VI, every 50 ms (timeout) the serial port is read ,the loop run 100 time (if it dont find events ) this is the aim of the shift register . This is like a 5s timeout but with the possibility to stop it.
About the frame on com port :
I want to detect touchs on a touch screen. So, The touch screen is connected to a computer and i use a program which send a frame on serial port each time the mouse is moving. With a crossover cable, I'm reading the serial port on an another computer (the one which use the VI).
I just want to detect when there is a frame.
I hope this is not too incomprehensible.
Thanks
Demum
08-01-2012 09:01 AM
08-02-2012 07:15 AM
08-03-2012 05:54 AM
Hi,
@Raven: Thanks for your advices, I deleted some loop and I moved Serial open & Close out of the main loop.
@DavidS: I want the possibility to stop waiting whenever i want .
But finaly, it seem's that the probleme come from the program which send fram on serial port.
I works perfectly now..
Thanks for help everybody.
And sorry for an another usless post ... 🙂