Software: CoDeSys V2.3 Function to achieve: control the traffic lights Problem: The POU PLC_PRG is written in SFC using IEC-Steps. There are three compiling errors which I cannot eliminate even though the help documents contain corresponding explainations.
at Transition T002,
Error 4355: A transition may not have any side effects (Assignments, FB-Calls etc.)
in line 3 at Transition T002,
Error 4370: PLC_PRG (3): Superfluous lines found after correct IL-transition.
in line 1 at Transition T001,
Error 4371: Transition T001 (1): Invalid characters following valid expression: 'T001 := START;"
T001
T001 := START;
T002
ST TON_2.IN
LD T#8S
ST TON_2.PT
CAL TON_2
LD TON_2.Q
ST T002
Some clues:
In the help docs of CoDeSys V2.3,
A transition condition must have the value TRUE or FALSE. Thus it can consist of either a boolean variable, a boolean address or a boolean constant. It can also contain a series of instructions having a boolean result, either in ST syntax (e.g. (i<= 100) AND b) or in any language desired (see 'Extras' '_ Action/Transition'). But a transition may not contain programs, function blocks or assignments!
In the help docs of CoDeSys V3.5,
CODESYS Development System > Reference, Programming > Programming Languages and their Editors > . Sequential Function Chart (SFC) > Elements > SFC Elements 'Step' and 'Transition' As opposed to CoDeSys V2.3, now CODESYS treats a transition condition like a method call. The entry has the following syntax:
<transition name="">:=<transition condition="">
(for example trans1:= a=100)
or only
<transition condition="">
(for example a=100)</transition></transition></transition>
Software: CoDeSys V2.3
Function to achieve: control the traffic lights
Problem: The POU PLC_PRG is written in SFC using IEC-Steps. There are three compiling errors which I cannot eliminate even though the help documents contain corresponding explainations.
at Transition T002,
Error 4355: A transition may not have any side effects (Assignments, FB-Calls etc.)
in line 3 at Transition T002,
Error 4370: PLC_PRG (3): Superfluous lines found after correct IL-transition.
in line 1 at Transition T001,
Error 4371: Transition T001 (1): Invalid characters following valid expression: 'T001 := START;"
T001
T001 := START;
T002
ST TON_2.IN
LD T#8S
ST TON_2.PT
CAL TON_2
LD TON_2.Q
ST T002
Some clues:
In the help docs of CoDeSys V2.3,
A transition condition must have the value TRUE or FALSE. Thus it can consist of either a boolean variable, a boolean address or a boolean constant. It can also contain a series of instructions having a boolean result, either in ST syntax (e.g. (i<= 100) AND b) or in any language desired (see 'Extras' '_ Action/Transition'). But a transition may not contain programs, function blocks or assignments!
In the help docs of CoDeSys V3.5,
CODESYS Development System > Reference, Programming > Programming Languages and their Editors > . Sequential Function Chart (SFC) > Elements > SFC Elements 'Step' and 'Transition'
As opposed to CoDeSys V2.3, now CODESYS treats a transition condition like a method call. The entry has the following syntax:
<transition name="">:=<transition condition="">
(for example trans1:= a=100)
or only
<transition condition="">
(for example a=100)</transition></transition></transition>
SFC_TrafficControl_SimpleTransitionWithStepTimer.pro [25.63 KiB]
SFC_TrafficControl_LD FBD Transition.pro [24.41 KiB]
SFC_TrafficControl_Action2Transition.pro [24.94 KiB]
SFC_TrafficControl.project [126.56 KiB]
SFC_TrafficControl.pro [24.32 KiB]