|
Make a write request (used in conjunction with WriteRequestRefresh).
syntax
WriteRequest(
tagName,
value
)
Parameters
tagName
|
|
Type:
|
character
|
|
The tag name. Multiple tag names can be specified as an array.
|
value
|
|
Type:
|
General purpose
|
|
The value to write.
|
Return Value
|
|
Type:
|
Boolean
|
|
FALSE - Failure. TRUE - Success.
|
Explanation
Although it has the same purpose as WriteRefresh, when WriteRequest is called, no actual communication is performed. When WriteRequestRefresh is called, all the write requests accumulated by previous calls to WriteRequest are processed together. Note that requests added with the WriteRequest method are cleared by calling the WriteRequestRefresh method, regardless of whether the processing was successful or unsuccessful. If you want to perform a retry process in the event of a failure, make sure to call the WriteRequest method again to make the request, and then call the WriteRequestRefresh method.
|
Example
|
this.WriteRequest("$D0", 1);
this.WriteRequest("$D1", 2);
this.WriteRequest("$D2", 3);
this.WriteRequestRefresh();
|
If you want to retry the WriteRequestRefresh procedure, you must call the WriteRequest method again.
|
::WriteRequest("U01.F01.T01",1);
::WriteRequest("U01.F01.T02",2);
if (::WriteRequestRefresh() == F)
{
::WriteRequest("U01.F01.T01",1);
::WriteRequest("U01.F01.T02",2);
::WriteRequestRefresh();
}
|
|
Supported
reference
AddTag
DelTag
ClearAllTag
GetVal
ReadVal
WriteVal
ReadRefresh
WriteRefresh
ReadRequest
ReadRequestRefresh
WriteRequest
WriteRequestRefresh
|