Download SCADAPack3xx C++ Tools User Manual
Transcript
Function Specifications
readBoolVariable
Read IEC 61131-1 Boolean Variable (IEC 61131-1 firmware only)
Syntax
#include <ctools.h>
BOOLEAN readBoolVariable(UCHAR * varName, UCHAR * value)
Description
This function returns the current value of the specified boolean variable.
The variable is specified by its name expressed as a character string. The name
is case insensitive (The IEC 61131-1 Dictionary also treats variable names as
case insensitive). If the variable is found, TRUE is returned and the variable
value is written to the unsigned char value pointed to by value. If the variable is
not found or if the IEC 61131-1 Symbols Status is invalid, FALSE is returned and
the current value is left unchanged. The IEC 61131-1 Symbols Status is invalid if
the Application TIC code download and Application Symbols download are not
sharing the same symbols CRC checksum.
Notes
This function requires the IEC 61131-1 Application Symbols to be downloaded to
the controller in addition to the Application TIC code. This function provides a
convenient method to access IEC 61131-1 variables by name; however, because
the variable name needs to be looked up in the IEC 61131-1 variable list each
call, the performance of the function may be slow for large numbers of variables.
For better performance, use the variable‟s network address and the dbase
function.
The IO_SYSTEM system resource needs to be requested before calling this
function.
See Also
readIntVariable, readRealVariable
Example
This program displays the contents of the boolean variable named “Switch1”.
#include <ctools.h>
int main(void)
{
BOOLEAN
status;
UCHAR char value;
request_resource(IO_SYSTEM);
status = readBoolVariable("Switch1", &value);
release_resource(IO_SYSTEM);
Document (Version 1.70) 5/23/2012
462
Related documents
SCADAPack 300 & 4203 C++ Tools
Control Microsystems SCADAPack2 C/C++ Tools
TelePACE C Tools User Manual
TelePACE C Tools User Manual
ISaGRAF C Tools User Manual
User Manual - ICP DAS USA`s I
Treck TCP/IP User Manual
HyperDeck Disk Recorders
Ladder Logic User Manual
R T E S USER MANUAL - rt
C-TOOLS @ MSU - Michigan State University
Integrating Low-Stakes Writing Into Large Classes