Gets the value of a tag. This is almost the same as GetVal, with the following differences:
1) dataSource can be specified (GetVal is fixed to the client cache).
2) You can receive a return value indicating whether communication was successful or unsuccessful (especially with external tags).
ReadVal communicates one point at a time.
For example, for the data source "device", calling ReadVal multiple times will result in communication with the PLC each time, slowing down the overall performance.
In such cases, we recommend the ReadRefresh method.
|