FieldPoint Family

cancel
Showing results for 
Search instead for 
Did you mean: 

Remote Control

I want to create SCADA with a host personal computer (PC) and cFP system on a remote site. I use a satellite communication service which can is assumed to be always on. I connect the PC to the satellite terminal and another satellite terminal to the cFP by S232. Normally, cFP runs its embedded RT Labview program. However, I need to change some settings (set points) and acquire data once a while. If the host can not target the cFP, how can the host PC directly write/read a file to/from cFP.
0 Kudos
Message 1 of 10
(5,650 Views)
Hello Taan Tao,

Your application looks very interesting. If you are trying to target your cFP from a PC, you must do it via ethernet. As you may know, accessing the serial ports (i.e. COM1, COM2, etc.) on Compact FieldPoint controllers from LabVIEW is not possible. The serial ports on these controllers are only accessible to embedded VIs running on the controller.

If you have an embedded VI running on your cFP, then you can do remote Front Panel and control your code from a host PC. You cannot change the code of course, only change the values of your controls in yout Front Panel for example.

Please let me know if I answered your question or if you have any additional questions. I am eager to know how you are setting up your system and to see if I answere
d your question.

Thank you!

LA
Message 2 of 10
(5,650 Views)
THANK YOU! It's amazing how we can remotely control the cFP by a web browser. It seems to be a great solution, but I still have some concerns:

1) If I understand correctly, I need to target cFP by ethernet to set up a remote Front Panel, like downloading VI to cFP and setting the browser accesses. After this is done, should I close the RT engines VI and switch to S-232 connection? After we close the RT engines VI, can we still access and control cFP via ftp?

2) For simplicity, I first assumed that the modems are always on. However, in reality, the modems are only turned on discontinuously (e.g. 1 min for every 10 mins). Will it work? Will it have enough time to download data from cFP and upload control commands(like changing a set point) to it
?

3) When we use the web browser to control cFP and download data from cFP, what files are exactly sent between cFP and host PC? Are they large? How often will the web browser download data from cFP to update the front panel? How often will it upload the control commands\?
0 Kudos
Message 3 of 10
(5,650 Views)
I want to restate my question 1)
I have tried Remote Front Panel with Ethernet network and everything works fine. Does it work with serial connection, because only Rs232 interface is available on the satellite terminals.
0 Kudos
Message 4 of 10
(5,650 Views)
Hello TaanTao,

I am glad I am being of help for your questions. I am going to do my best to answer well every single one of your questions and solve any doubts that you may have. Let's see:

>>1. I have tried Remote Front Panel with Ethernet network and everything works fine. Does it work with serial connection, because only Rs232 interface is available on the satellite terminals.

Since RS 232 is the only interface available on satellite terminals, what we can do is the following:

-We can use Ethernet first to embed a code in the controller that would allow serial communication through the serial port of the cFP.
-The code embedded should act as a server (or client) to communicate with a Host Computer that would be the client (or server) to establish the serial communication.

>>2) For simplicity, I first assumed that the modems are always on. However, in reality, the modems are only turned on discontinuously (e.g. 1 min for every 10 mins). Will it work? Will it have enough time to download data from cFP and upload control commands (like changing a set point) to it?

If your modems are turned on discontinuously, you would have to compensate for it programmatically to avoid communication problems. This will be hard to do, especially if the discontinuity is inconsistent. If it is constant, it would be easier to compensate for it programmatically.

3) When we use the web browser to control cFP and download data from cFP, what files are exactly sent between cFP and host PC? Are they large? How often will the web browser download data from cFP to update the front panel? How often will it upload the control commands?"

To answer all these questions, I am going to explain you what happens when you use the web browser to control the Front Panel of an embedded VI. To embed a VI in the controller, you create an executable and store it the controller's memory and select for it to run at boot up. Then from that same VI, you also create an html file, and you store it in the server of the cFP. So once you reboot your controller, your executable file will start running and from your host PC, you can access that html file stored in the controller. So basically, the information that gets passed from the controller to the PC is the same as a client-server communication in the normal internet. Therefore, we are going to access the Front Panel that is stored in that html, and the data is going to be updated at all times in the communication. How much time it takes to update? That is dependent on your network.
0 Kudos
Message 5 of 10
(5,650 Views)
Part of the program that you embed in the cFP controller should be a serial communications handler. The serial handler should open and watch the serial port for communications. By formatting your messages to include a start character (or characters), a checksum, and a termination character, you can build a fairly robust system that will respond to transmitted commands and will be easily able to handle the intermittent communications that you mention, while rejecting any bad messages. As part of the command set that you create for the messages, you can include commands to Read a Setpoint, Change a Setpoint, Download a file, and upload a file. For reliability reasons (and the possibility of disconnects), you may want the file download/upload commands to only
transmit a portion of the file at a time (e.g. 100 bytes).

There are some other things to consider as you set the system up. The cable between the cFP controller and the modem will most likely need to be a straight cable. The modems should be set to connect at only the configured Baud Rate. The FieldPoint module should set its serial port to the same Baud Rate.

Regards,
Aaron
LabVIEW Champion, CLA, CPI
Message 6 of 10
(5,650 Views)
I will use VISA(serial) to configure the ports and send files between PC and cFP. Therefore, I want to open the serial port connections of PC and cFP at the same time. Does cFP have an internal clock, so I can program it to open serial port at a specific time?
0 Kudos
Message 7 of 10
(5,650 Views)
Yes it does. However, there will be drift between the clocks (PC clock vs cFP clock) which may result in syncronization problems. There is no harm in leaving the serial port open on the cFP. You can use the VISA Bytes at Serial Port to wait for the start of a transmission.

Regards,
Aaron
LabVIEW Champion, CLA, CPI
0 Kudos
Message 8 of 10
(5,650 Views)
Thanx again!
Is the drift between clocks consistent? Are they always different by the same amount of time? Even I leave the serial port open, I still want the cFP to send a file back to host every 10 minutes (according to the PC time).
0 Kudos
Message 9 of 10
(5,650 Views)
The time drift between clocks may or may not be consistent. If one machine is 0.001% faster than the other, then they will drift 1 second per day with respect to each other. The better way to do it, which will leave the cFP system more or less immune to the time drift problem is to make the cFP system respond to commands on the serial port. Thus when the computer is online with the cFP, it can send a command to tell the cFP to transmit the file. The cFP will be waiting for a valid command and then can send the file. This eliminates the need and problems in keeping the clocks syncronized.

Regards,
Aaron
LabVIEW Champion, CLA, CPI
0 Kudos
Message 10 of 10
(5,650 Views)