beautypg.com

C editor, C editor -13 – Sensaphone SCADA 3000 Users manual User Manual

Page 199

background image

16-13

Chapter 16: Programming in C

C eDITOR

The SCADA 3000 Software contains a C programming utility that allows you to write C

programs, upload/download them to the SCADA 3000, save/load C programs on your com-

puter, compile, run, and start programs in the SCADA 3000. This can be performed while

online through the RS232 serial port or remotely via modem. To access the C Editor, open the

Control Center form and click on the “C” button in the toolbar or choose “C” from the main

menu. The following form will appear:

Figure 1: C Editor form

Use this form to write and edit your C programs. You do not have to be on-line with the

SCADA 3000 to write a C program. The buttons on the form are, from left to right: Open

Program, Save Program, Cut, Copy, Paste, Undo, Syntax Check, Compile Program, Upload Program,

Download Program, and Start/Stop Program.
An example of a C Program written in the editor window follows.

Figure 2: C program Example

When using the read_uaf and write_uaf functions, there is a shortcut to help construct these

statements. From the C Editor menu select Program, then Select Unit. Choose the unit that will

be running this C Program from the drop-down box, click the button that says Log-in Now, and

click OK. When you are ready to enter your UAF, click on your right mouse button. Click on

the Insert UAF parameter and a list of all valid UAFs will be displayed. Click on the UAF you

want to use and it will be inserted automatically at the cursor point.
When you are finished writing your program, save it to your computer by clicking File, then

Save. To open a previously saved program, use the Open Program button or click File>Open.