Program read from IC card
When the execution criterion of F14_PGRD is turned ON, the execution proceeds until the END. The program subsequently switches to the program specified by s.
Input
starting address of area storing program
All input and output variables used for programming this function have been declared in the POU header. The same POU header is used for all programming languages.
VAR
start: BOOL:=FALSE;
(*activates the function*)
dummy_array: ARRAY [0..5] OF WORD:=[6(0)];
(*contains the file
name in HEX_ASCII format*)
END_VAR
When the variable start is set to TRUE, the function is carried out.
The instruction reads the program Prog1 from the IC card and executes it.BODY
WORKSPACE
NETWORK_LIST_TYPE := NWTYPELD ;
ACTIVE_NETWORK := 0 ;
END_WORKSPACE
NET_WORK
NETWORK_TYPE := NWTYPELD ;
NETWORK_LABEL := ;
NETWORK_TITLE := ;
NETWORK_HEIGHT := 7 ;
NETWORK_BODY
B(B_CONTACT,,start,3,1,5,3,);
B(B_F,F95_ASC,,9,0,16,4,,?DEN?D@'s'?AENO?Cd);
B(B_VARIN,,'Prog1',7,2,9,4,);
B(B_VAROUT,,dummy_array[0],16,2,18,4,);
B(B_F,F14_PGRD,,32,0,40,4,,?DEN?D@'s'?AENO);
B(B_VARIN,,dummy_array,30,2,32,4,);
L(1,2,3,2);
L(5,2,9,2);
L(16,2,32,2);
L(1,0,1,7);
END_NETWORK_BODY
END_NET_WORK
END_BODY
IF start then
F95_ASC( s:= 'Prog1',
d_Start=> dummy_array[0]);
F14_PGRD( dummy_array );
END_IF;
LD |
start |
|
F95_ASC |
‘Prog1’,dummy_array[0] |
(* Writing the file name (Hex-ASCII format) into dummy_array[0] (Array [0..5] of WORD)*) |
LD |
start |
(* EN = start; Starting signal for the F14_PGRD function. *) |
F14_PGRD |
dummy_array |
(* s = dummy_array *) |
(* dummy_array[0] contains already (F95_ASC) the file name in Hex-ASCII format *) |
||
ST |
out |
(* option *) |