Serial Communication Problems with LabVIEW FRC Toolkit

Danny

The toolkit is great! Obviously, a lot of hard work went into it and will be appreciated by all.

I do have a couple of connection issues using my laptop and its single com port. Once I bring up LV 8.2, the SocketServer and the Desktop Provider, EasyC can’t access the com port; I find I have to shut down all the NI apps in order to see com 1 again. Once I get my program downloaded to the RC and reconnect to the Dashboard port (bringing all the NI apps back up), now I find the sim vi won’t communicate with the OI/RC setup.

Any assistance welcome!

Jon

Yes, and I hate to be the bearer of bad news but this isn’t going to be something we’re going to be able to fix. The problem is that the Dashboard Provider opens the serial port for read, and constantly reads from the port - as long as the Dashboard Provider is up and running, no other applications will be able to use the serial port. The same goes if you have Hyperterminal open on that COM port, EasyC shouldn’t be able to use the COM port if Hyperterminal is using that port!

Admittedly, the guys at WPI took some liberties in the persuit of a brief and informative video - if you’re going to use only one serial port, remember that you need to stop the dashboard provider (or maybe pause, I don’t have my USB-Serial adapter with me today so I cannot test this out myself) before attempting to have another program use the port. It is soooo much easier to use 2 serial ports - I had to steal an additional USB-Serial device (from the NI-Serial team a couple floors up from me) for this project - but certainly you must use what you have. It wouldn’t surprise me if the WPI guys used 2 serial ports for this project; one dedicated to the Dashboard and one dedicated to uploading code and displaying the debug information (printf’s).

Without having my handy-dandy USB-Serial device on me, I can only surmise that the same thing is happening in reverse; EasyC might still have a handle open to the COM port, which causes the Dashboard Provider VI to be unable to open the Serial port. The easiest way to find out in the short term would be to close EasyC and see if the NI app can then use the COM port again. Unfortunately the Dashboard Provider VI is a bit lacking in the error checking department, I’ll have to add an error handling block on the VISA calls when dealing with the COM ports to alert you to resource sharing conflicts. If you were to do the same it would show you the error.

-Danny