Parallel printout
Outputs the ASCII codes for 12 characters stored in the 6-word area specified by s_Start via the word output specified by d if the trigger EN is TRUE. If a printer is connected to the output specified by d, a character corresponding to the output ASCII code is printed.
Input
starting 16-bit area for storing 12 bytes (6 words) of ASCII codes (source)
Output
word output used for output of ASCII codes (destination)
Only bit positions 0 to 8 of d are used in the actual printout. ASCII code is output in sequence starting with the lower byte of the starting area. Three scans are required for 1 character constant output. Therefore, 37 scans are required until all characters constants are output.
Since it is not possible to execute multiple F147_PR instructions in one scan, use print-out flag sys_bIsActive_F147_PR to be sure they are not executed simultaneously. If the character constants convert to ASCII code, use of the F95_ASC instruction is recommended.
if the ending area for storing ASCII codes exceeds the limit
if the trigger of another F147_PR instruction turns to TRUE while one F147_PR instruction is being executed
if the ending area for storing ASCII codes exceeds the limit
if the trigger of another F147_PR instruction turns to TRUE while one F147_PR instruction is being executed
In the global variable list you define variables that can be accessed by all POUs in the project.
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;
END_VAR
VAR_EXTERNAL
PrintOutFlag: BOOL:=FALSE;
END_VAR
VAR
PrintOutString: STRING[12]:='ABCDEFGHIJ$L$R';
END_VAR
VAR_EXTERNAL
Printer: WORD:=0;
END_VAR
VAR
@'': @'';
END_VAR
BODY
WORKSPACE
NETWORK_LIST_TYPE := NWTYPELD ;
ACTIVE_NETWORK := 0 ;
END_WORKSPACE
NET_WORK
NETWORK_TYPE := NWTYPELD ;
NETWORK_LABEL := ;
NETWORK_TITLE := ;
NETWORK_HEIGHT := 13 ;
NETWORK_BODY
B(B_CONTACT,,Start,4,2,6,4,R);
B(B_F,F147_PR!,Instance,19,1,25,5,,?DEN?Ds_Start?AENO?Cd);
B(B_CONTACT,,PrintOutFlag,4,5,6,7,);
B(B_VAROUT,,Printer,25,3,27,5,);
B(B_F,Adr_Of_VarOffs_I!,Instance,9,7,18,11,,?D@'Var'?DOffs?CAdr);
B(B_VARIN,,2,7,9,9,11,);
B(B_VARIN,,PrintOutString,7,8,9,10,);
L(1,3,4,3);
L(6,3,19,3);
L(1,6,4,6);
L(6,6,10,6);
L(10,3,10,6);
L(19,4,19,9);
L(18,9,19,9);
L(1,0,1,13);
END_NETWORK_BODY
END_NET_WORK
END_BODY
IF DF(start) OR PrintOutFlag then
F147_PR( Adr_Of_VarOffs( PrintOutString, 2), Printer);
END_IF;