-
-
Notifications
You must be signed in to change notification settings - Fork 76
PLC Control functions
Federico Barresi edited this page Jan 12, 2019
·
1 revision
With these control function it’s possible to Start/Stop a CPU and read the PLC status.
Function | Purpose |
---|---|
PlcColdStart | Puts the CPU in RUN mode performing an COLD START |
PlcHotStart | Puts the CPU in RUN mode performing an HOT START |
PlcStop | Puts the CPU in STOP mode |
PlcGetStatus | Returns the CPU status (running/stopped) |
Puts the CPU in RUN mode performing an COLD START.
public int PlcColdStart()
- 0 : The function was accomplished with no errors.
- Other values : Either the PLC is already running or the current protection level is not met to perform this operation.
This function is subject to the security level set.
Puts the CPU in RUN mode performing an HOT START.
public int PlcHotStart()
- 0 : The function was accomplished with no errors.
- Other values : Either the PLC is already running or the current protection level is not met to perform this operation.
This function is subject to the security level set.
Puts the CPU in STOP mode.
public int PlcStop()
- 0 : The function was accomplished with no errors.
- Other values : Either the PLC is already stopped or the current protection level is not met to perform this operation.
This function is subject to the security level set.
Returns the CPU status (running/stopped) into Status.Value.
public int GetPlcStatus(ref int Status)
Name | Type | Note |
---|---|---|
Status | int | PLC status |
Helper Const | Value | Meaning |
---|---|---|
S7.S7CpuStatusUnknown | 0x00 | The CPU status is unknown |
S7.S7CpuStatusRun | 0x08 | The CPU is running |
S7.S7CpuStatusStop | 0x04 | The CPU is stopped |
- 0 : The function was accomplished with no errors.
- Other values : see the Errors Code List.