Programming the MOBY-ASM on PROFIBUS
B.1 Programming the MOBY-ASM on PROFIBUS DP-V1
FC 45
Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618
B-3
Principle of controlling non-cyclic communication with command and acknowledgment counter
&RPPDQGFRXQWHU
$FNQRZOHGJHPHQWFRXQWHU
6WDWXVRIFRXQWHUVDIWHU$60SRZHUXSRUDIWHUDQLQLWBUXQB
02%<$60
DFWLYH
'39WHOHJUDP
&RPPDQG
UHDG\
&RPPDQG
UHDG\
&RPPDQG
UHDG\
&RPPDQG
UHDG\
'39WHOHJUDP
'39WHOHJUDP
'39WHOHJUDP
02%<$60
DFWLYH
02%<$60
DFWLYH
02%<$60
DFWLYH
'39WHOHJUDP
'39WHOHJUDP
'39WHOHJUDP
'39WHOHJUDP
Figure B-1
Command and acknowledgement counter states
As you can see from the diagram above, a DP-V1 telegram triggers the change from one
defined state to the next. A new DP-V1 telegram is not permitted until the next state is
reached. A DP-V1 telegram is either a command to the ASM or an acknowledgment from the
ASM.
For this reason, it is important to tell the master whether a new DP-V1 telegram can be
executed.
Each state is coded in 2 bits and counted up (as shown in the diagram above)-
hence the name state bits or state counters.
The state bits are transmitted cyclically to the master via PROFIBUS DP. The user must
evaluate the bits in his program. When the state bit changes, a new state (new state = old
state + 1) is created. Only now can the next DP-V1 telegram be sent.
Two states must be coded.
1.
Command state (command counter) to tell the user whether a new/next command may
be transferred to the MOBY-ASM
2.
Acknowledgment state (acknowledgment counter) to tell the user whether a new
acknowledgment from the MOBY-ASM is waiting