05-28-2006 11:07 PM
05-29-2006 05:43 AM
My first suggestion would be to abandon the serial modem and to see if you can use a TCP connection through the cRIO's ethernet port. Depending on the area and on the strength of transmission, you can get some variants of the 802 wireless standards to supports the ranges you want or you can have some of your network wired.
Then, each program can open its own port, you should have much faster rates of communication, you won't have a problem with using a shared hardware resource (the modem) and you will have a much easier time if you need to replace the hardware or port the program, because TCP is built for this and can be found practically anywhere. You can find examples for communication protocols between LV programs if you search the example finder for "TCP" or if you search this site for "Messaging Protocol".
If you still do want to use the serial modem (although I still think that's a bad idea), your best bet is probably to put both programs into a single calling VI and switch between them by ending the running program and starting the other one. Another option is to have both of them running and to use a common resource (like a global) to let each program know whether it can use the serial port or not. Yet another option is to have a single location handle the serial communication and to pass messages to that location and back using a communication mechanism like queues or RT FIFOs.