BP Communication Driver is the driver to communicate with automatic insterter of BP(Board Packer).
<Figure 1> is read setting example of BP communication driver.
<Figure 1> Read setting example of BP communication driver |
Device part of <Figure 1> input Com Port(COM1), Baud Rate(4800), Parity Bit(0), Data Bit(8), Stop Bit(1) respectively.
BP communication driver¡¯s read schedule
BP communication driver's read schedule input 'READ' one line.
BP communication driver can download and upload by write command.
Error/Complete status bits
BP communication driver save Error/Complete status of download and upload to WORD memory such as <Table 1>.
Also Error/Complete status are saved to 'c:\error_msg000.txt'.
<Table 1> is a description of contents and save position of Error/Complete stattus of BP communication driver.
Contents | Save position | Address of digital input tag |
Error stauts | 1st bit of 0 WORD memory | 0000 |
complete of download/upload | 2nd bit of 0 WORD memory | 0001 |
<Table 1> Contents and save position of Error/Complete stattus of BP communication driver |
Note) After read Error/Complete status bits, you have to 'OFF' that bits by '#mem#' write command.
'#mem#' command) Please write digital/analog output tag after set 'Extra1' = '#mem#'.
example) PORT : 0 STATION : 0 ADDRESS : 0000 EXTRA1 : #mem# EXTRA2 : 0
The setting parameter shown above is an example of write for the entered(writed number) value of 0 port.
You can change the setting values of FLOS Batch Controller BC410 by using write commands.
Bit Write
Bit write setting parameters are as follows:
1) PORT Port no. (0 ~ 255)
2) STATION Don't care.
3) ADDRESS Don't care.
4) Extra1 Write command = CMD_FILE, DOWNLOAD, UPLOAD. ( Refer to <Table 2> )
5) Extra2 UPLOAD write command : 0 = don't overwrite when saving file already exist, 1 = overwrite when saving file already exist,
other command : Don't care.
<Table 2> is contents and usage for write command of BP communication driver.
Write Command | Usage | Contents | Remarks |
CMD_FILE | - | Read command data to 1st line character of 'C:\cmd_file%03d.txt' (%03d = port number) file. | |
DOWNLOAD | After pressing DOWNLOAD/UPLOAD switch, then write command | Read download data at inputed data file. command format(Extra1) = DOWNLOAD ???? ???? = download data filename |
ex) DOWNLOAD 1.TXT download data filename = 1.TXT, full path name = 'work folder\DATA\1.TXT' |
UPLOAD | Read upload data at inputed data file. command format(Extra1) = UPLOAD ???? xxxx ???? = don't care. xxxx = upload data filename |
ex) UPLOAD 1.TXT UP\UP123.TXT, don't care = 1.TXT, upload data filename = UP\UP123.TXT, full path name = 'work folder\DATA\UP\UP123.TXT' |
|
<Table 2> Contents and usage for write command of BP communication driver |
Note) For matching UICS, VID communication driver, the 1st filename(Extar1 = UPLOAD ???? xxxx) don't cared at UPLOAD write command.
Write example 1)
Port : 0 Station : 0 Address : 0000 Extra1 : cmd_file, EXTRA2 : 1
The setting parameter shown above is an example of bit write for 'cmd_filename' command.
If you input 'UPLOAD 1.txt up\bp.txt' at 1st line of 'C:\cmd_file000.txt', communication driver save operation status of BP(after communication) equipment to 'work folder\data\up\bp.txt'.
When exist 'bp.txt' file, then overwrite the file.
Write example 2)
Port : 0 Station : 0 Address : 0000 Extra1 : cmd_file, EXTRA2 : 1
The setting parameter shown above is an example of bit write for 'cmd_filename' command.
If you input 'DOWNLOAD downdata\dn01.txt' at 1st line of 'C:\cmd_file000.txt', communication driver send file data to BP equipment after reading 'work folderdata \downdata\dn01.txt' file.
Word Write
Word write and bit write have the same setting parameters except output value.
3. Example of Erros/Compete status bit control
BP communication driver save Error/Complete status of download and upload to WORD memory, address 0.(Error bit = 0000, Complete bit = 0001)
You can use Error/Complete bit as follows.
a) Make digital input tag. Error status bit Tag address = 0000, Complete status bit Tag address = 0001.
b) Create script such as <Table 3>, <Figure 2> 'script when program(LocalMain.exe) running'.
c) Run 'LocalMain.exe' program.
Functin | Contents |
Shows error message at LocalMain program occurred error status bit. |
if($err_check == OFF) { flag = OFF; return; } if(flag == ON) return;
handle = @FileOpen("C:\\error_msg000.txt", "r"); if(handle == 0) return;
len = @FileRead(handle, buf, 79); @FileClose(handle);
buf[len] = 0; @Message(buf); flag = ON; $err_flag_clear1 = OFF; |
<Table 3> Example of script to show occurred error status bit |
<Figure 2> Example of script editing to show occurred error status bit |