GE GFK-0726B Computer Hardware User Manual


 
4
4-2 State Logic Processor for Series 90-30 PLC User’s Guide – March 1998
GFK-0726B
Programming Serial Communications
The program communicates through two ports using WRITE and READ terms. For ex-
ample:
State: Get_Setpoint
Write “Enter New Setpoint” to Operator_Panel.
Read SetPoint1 from Operator_Panel, then go to Check_Setpoint State.
The Write Term sends the string of characters, Enter New Setpoint, to the port defined as
the Operator_Panel. This same port is then monitored for input by the Read Term in the
next Statement. The variable Setpoint1 is set to the value entered through the specified
port.
In this example the WRITE and READ term information is directed to a particular port.
Operator_Panel in this case is defined in ECLiPS as Port 1 or Port 2. Use the ECLiPS, DE-
FINE or LIST menus to make the port definitions. The default names are Port_1 and
Port_2.
The Read and Write Terms may also be used without being directed to any particular
channel, for example:
State: Choose_Recipe
Write “Enter Recipe Number”.
Read Recipe_Number, then go to StartBatch State.
Since no port is specified in this example, information is sent to the programming port.
For a more detailed discussion of programming serial input and output, refer to the Ref-
erence Section of the ECLiPS User’s Manual.