© Stäubli 2009 – D28070504A CS8C96 / 248
5.7. PROGRAMMABLE LOGIC CONTROLLER (PLC OPTION)
The CS8C controller can be programmed using IEC61131-3 standard PLC languages: IL, SFC (GRAFCET), FBD,
LD, ST.
The PLC program must be written on a PC in the PLC programming environment supplied with
Stäubli Robotics Studio. It can then be downloaded and executed on the CS8C controller.
The PLC option requires a PLC licence for the SRS programming environment, and a runtime licence for each
CS8C controller.
Without a licence, it is possible to use the PLC programming environment for 30 minutes and execute the PLC
program on a CS8C for 15 minutes.
5.7.1. INSTALLATION
SRS
The PLC programming environment is supplied with SRS. During installation, it is necessary to keep to the
selected PLC option.
To activate the PLC programming licence, it is necessary to connect the PLC key to the PC and enter the licence
number using the SRS utility (Tools > PLC > Licence).
CS8C
The PLC option can be activated on a CS8C using the SRS options manager (Tools > PLC > Options manager).
After restarting, the option must be shown in the list of software component versions on the MCP (Control panel
> Controller > Versions).
5.7.2. OPERATION IN THE CS8C CONTROLLER
PLC cycle
The PLC program in the CS8C has access to all the digital and analog inputs and outputs in the system. It can
communicate with a VAL3 program via the analog or digital outputs of the system.
The PLC cycle is carried out as follows:
1. Reading the inputs and outputs
2. Execution of a cycle in the PLC program
3. Writing the outputs
4. Waiting for the rest of the time lapse required to reach the specified cycle time
The cycle time for the PLC program is defined in the PLC development environment (Generate > Execution
options). It can be modified at any time.
The CS8C supports cycle times that are multiples of 4ms. The sequencing accuracy of the PLC cycle (period
between two successive PLC cycle starts) is about ±0.1ms.
When the specified cycle time is null, the system automatically adapts the PLC cycle time to the system CPU load,
and more specifically to the VAL3 program. The PLC program has then less priority than the VAL3 program.
Starting
The PLC program is physically stored in the controller, in the /usr/plc directory. When the controller starts up, the
PLC program stored in this location is started automatically. The only way of inhibiting the automatic start is to
delete the file from the controller using Ftp.
During start-up, if an error is detected in the PLC program (PLC Input/Output not found in the CS8C, or PLC output
corresponding to a CS8C input), the unit does not start up and the error is displayed in the "Events logger" utility
of the MCP.