acl_set_symbol_c
status.i4.v = acl_set_symbol_c(symbol_name.i1a.r, value.g.v,
value_type.i4.v, value_length.i4.v,
options.u4.v [,array_index.i4.v])
This routine sets the value of a symbol in the Accelerator Command
Language (ACL) environment. If the symbol doesn't already exist,
this routine can create a new symbol. These symbol values still
exist after an ACL script has finished executing to determine
reading or status values resulting from the execution or to feed
input into another script.
symbol_name null terminated symbol name
(up to ACL_SYMBOL_NAME_LEN characters)
value desired value
value_type type of value
(ACL_BYTE_VALUE -> byte integer value,
ACL_UNSIGNED_BYTE_VALUE -> unsigned byte integer value,
ACL_SHORT_INT_VALUE -> short integer value,
ACL_UNSIGNED_SHORT_VALUE -> unsigned short integer
value,
ACL_INTEGER_VALUE -> long integer value,
ACL_UNSIGNED_INT_VALUE -> unsigned long integer value,
ACL_FLOAT_VALUE -> single precision floating
point value,
ACL_DOUBLE_VALUE -> double precision floating
point value,
ACL_STRING_VALUE -> null terminated string value,
ACL_LOGICAL_VALUE -> logical value (integer value),
ACL_DATE_VALUE -> date value in clinks
(unsigned integer value),
ACL_ERROR_VALUE -> ACNET error value (integer value),
ACL_SYSTEM_ERROR_VALUE -> system error value
(integer value),
ACL_RTL_ERROR_VALUE -> RTL error value (integer value),
ACL_NODE_VALUE -> ACNET node value (integer value),
ACL_EVENT_VALUE -> clock event value (integer value),
ACL_DEVICE_INDEX_VALUE -> device index value
(integer value))
value_length length of value in bytes
options usage options
(ACL_OPT_NONE -> no options selected,
ACL_OPT_CREATE_SYMBOL -> create a new symbol if
the requested symbol
doesn't exist)
[array_index] array index (default is 0)
This function returns ACNET status values as follows:
CLIB_OK success
CLIB_NO_SUCH symbol doesn't exist
CLIB_DELETED symbol has been deleted
otherwise other ACNET format error code
This function requires the following include files:
cbslib_h, acnet_errors.h
Related functions:
intro_acl, acl_read_symbol_c, acl_read_symbol_info_c, acl_execute_c,
acl_file_execute_c, acl_file_read_c, acl_file_write_c, acl_compile_c,
acl_free_c, acl_read_symbol_names, acl_delete_symbol, acl_info_c,
acl_cancel_requests_c, acl_default_data_source_c, acl_log_file_c,
acl_default_script_path_c, acl_script_is_executing,
acl_register_host_request_func, acl_unregister_host_request_func,
acl_translate_command_string
C usage:
static const char symbol_name[] = "my_symbol";
int status;
int value_type = ACL_FLOAT_VALUE;
int value_length = sizeof(float);
int array_index = 0;
unsigned int options = ACL_OPT_CREATE_SYMBOL;
float value = VALUE;
status = acl_set_symbol_c(symbol_name,(void *) &value,value_type,
value_length,options,array_index);