REFRESH_DB
Asynchronous assignment of variable from an ASCII file.
WebVue support - Yes.
Mode |
Mnemonic |
Syntax |
0 | SETUP | 1 |
1 | LOAD | 2 |
Syntax 1
IntVal = REFRESH_DB(Mode, AssignTime, IdleTime);
Return type: INTEGER.
Argument |
Meaning |
AssignTime |
The time period allowed to assign values to the list of variables. Default value 250 ms. Type INTEGER. |
IdleTime |
The time during which the process is paused. Default value 250 ms. Type INTEGER. |
Execution
Mode |
Mnemonic |
Action |
0 |
SETUP |
Change the delays used in assigning values to variables. |
If the SETUP mode is used without any parameters, the assignment is treated in one block. If values are to be assigned to a large number of variables, this could eventually stop the system.
Syntax 2
IntVal = REFRESH_DB(Mode, Filename [, Type]);
Return type: INTEGER.
Filename |
Name of the file from which the assignment will be made. The syntax must be as follows: id1,
val 1 |
|
where: id is the identification of the variable(either its name or its internal Id). |
Type |
Specifies the type of file: 0 The name of the variable is specified
(default). |
Execution
Mode |
Mnemonic |
Action |
1 |
LOAD |
Start the assignment process. Return: 1 if OK, else 0. |
Example
SUB rdb_set()
REFRESH_DB("SETUP", 800, 1000);
END SUB
SUB rdb_go()
DIM i as integer;
i = 0;
WHILE (i == 0)
i = REFRESH_DB("LOAD", "C\\DLOAD\\tstvar.txt");
DELAY(2);
WEND
END SUB