PROTOCOL COMMUNICATION
PT10789220
pag. 6/22
The schematic conceptual flow of the program FB is the following :
block number = 1; /* init the number of block to be required to NEMO 96HD */
status = 1; /* init the internal status of the software */
while (TRUE) begin
case (status) :
if 1 begin
bit 2.0 (output header) = 1; /* start NEMO 96HD internal processing */
BYTE 0 (Output header) = block number;
status = 2;
end case
if 2 begin
if (bit 3.4 = 1) begin /* internal processing running */
bit 2.0 (output header) = 0; /* stop NEMO 96HD internal processing
after the completion of the
current operation */
status = 3;
end
end case
if 3 begin
if (bit 3.5 = 1) begin /* internal processing finished */
( data in the telegram are valid )
if (telegram is OK) begin /* block number between input and
output headers agree … */
transfer data from telegram in the PLC area;
block number = +1;
if (block number > 7) begin
block number = 1;
status = 1; /* restart */
else begin
status = 3; /* next request */
end
end
end
end case
End while