Signal Conditioning

cancel
Showing results for 
Search instead for 
Did you mean: 

Running two applications in RT and selecting one of them to run in the foreground.

Hello  All,
Can anyone help in by suggesting a solution to this problem....
I am using a RT controller cRIO-9002, I need to deploy two independent applicatons( both of these applications use serial com port to receive and transmit data) in such a way that one of them is running in the foreground and other in the background. On receiving a command the two applications should interchange themself ie. the former should now run in the background and the later in foreground.Is it possible to go about??? If possibe .......... please continue reading....the  second part.
 
This controller is to be deployed in the field.There is one more appllication(not RT) running on a PC and located a far distance(few  Kms). These two applications(PC & RT) communicate through a radio modem which has a serial com interface.   Something this way.....
 
PC application>>serial port>>radio modem.........Tx...............radio modem>>serial port>>RT application
 
PC application<<serial port<<radio modem.........Tx...............radio modem<<serial port<<RT application
 
So there is two way comunication.
 
The processed data from the RT application(field)is sent to the serial port which is connected to a radio modem and gets transmitted.
The user interface(PC) appilication receives this data through a similiar radio modem. On will i need to change some setting for the RT application  through the user interface(PC) application which goes as command following the (first) path  dipicted above.
 
In the end i also need to  change  which application should run in the foreground and which in the background through the user interface(PC) application.
 
This too much i believe......take time .........no hurry ......please suggest some way to achieve this.
Thanking you in advance.
Regards
aswin & siva
 
0 Kudos
Message 1 of 2
(3,099 Views)

Hello Aswin & Siva,

This sounds like an interesting application! There are a couple of points I'd like to address to answer your questions:

1. Provided the radio modem is "transparent" to the COM ports, you should be able to treat this like any other serial/VISA application in LabVIEW. There are numerous examples of communicating serially with LabVIEW, most of which are included with LabVIEW itself (Help >> Find Examples...)

2. The tricky part is what you mean by "foreground" and "background." If an application is in the background, is it running at all? If so, what is it doing? What (if any) resources are the two applications sharing (besides the serial port)? VI Server may be the best option you have for controlling which application is running. I would recommend one "framework" VI that is always running and communicating with the serial port. Use this framework VI then to control and pass parameters to and from the other two VI's.

3. There is a tutorial on our website that discusses a communication architecture for TCP/IP communication. While this does not address your application directly, you could replace the TCP/IP VI's with VISA VI's quite readily as they both use strings to read and write data. You can find it here:

http://zone.ni.com/devzone/conceptd.nsf/webmain/CD63FD0F746B17A686256F090065F572

Using a command architecture such as this you could control your applications remotely.

I hope this helps some. With more information on "foreground" and "background" I may be able to better answer your question. Have a good one!

Charlie S.

Visit ni.com/gettingstarted for step-by-step help in setting up your system
0 Kudos
Message 2 of 2
(3,071 Views)