从IC卡读取的程序
当打开F14_PGRD的执行标准时,执行继续直到END。程序随后切换到s指定的程序。
输入
程序存储区域的起始地址
所有用于编程此函数的输入和输出变量已在POU头中声明。 所有编程语言使用相同的POU头。
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
当变量start设置为TRUE时,执行此函数。
此指令从IC卡读取程序Prog1并执行。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 *) |