Function Blocks
A3brWebService
Establish the initial connection to the IRC, and handle channeling of all HTTP traffic back and forth. This block handles authenticating with the server, reporting HTTP errors, and invoking other blocks’ success or failure callbacks. It also provides a simple interface for other blocks to push requests to without having to handle the HTTP side of things themselves. This makes the library easy to expand with new function blocks.
Direction | Name | Type | Description |
---|---|---|---|
In | enable | BOOL | Initialize the connection to the IRC |
In | reset | BOOL | Reset FUB error. Required to resume operation after error has occurred |
In | configuration | A3brWebServiceCfg_typ | Connection parameters to IRC |
Out | ident | UDINT | a3br connection ident. Used by all other blocks |
Out | connected | BOOL | Connection to IRC established, authentication successful, and other blocks can send their commands |
Out | error | BOOL | An error has occurred |
Out | errorID | UINT | Error ID, refer to A3BR_ERR_enum |
Out | errorString | String[80] | Description of error |
A3brControl
Send high level commands to the IRC to control robot execution state.
Direction | Name | Type | Description |
---|---|---|---|
In | ident | UDINT | a3br connection ident. Provided by A3brWebService |
In | power | BOOL | Set the controller state to motoron or motoroff |
In | start | BOOL | Start RAPID execution using the specified cycle type |
In | stop | BOOL | Stop RAPID execution |
In | reset | BOOL | Reset the program pointer (PP) to main |
In | requestMasterhip | BOOL | (EXPERIMENTAL) Request Mastership on all IRC domains |
In | releaseMasterhip | BOOL | (EXPERIMENTAL) Release Mastership on all IRC domains |
In | cycle | A3BR_RAPID_CYCLE_ST_enum | Type of RAPID cycle to use with Start command |
Out | busy | BOOL | Command is being executed |
Out | done | BOOL | Command is completed |
Out | error | BOOL | An error has occurred |
Out | errorID | UINT | Error ID, refer to A3BR_ERR_enum |
Out | errorString | String[80] | Description of error |
A3brSetIO
Write a value to an IO signal on the IRC. This block performs a one-time write operation upon rising edge of execute.
Direction | Name | Type | Description |
---|---|---|---|
In | ident | UDINT | a3br connection ident. Provided by A3brWebService |
In | execute | BOOL | Initiate a single write operation |
In | pSignal | STRING* | Pointer to a STRING containing the name of the IO signal as it appears on the IRC. Target string is required to be of length A3BR_IO_STR_LEN |
In | mode | UDINT | Not yet implemented |
In | value | INT | The value to write to the IO signal |
In | delay | UDINT | Not yet implemented |
In | pulses | UDINT | Not yet implemented |
In | activePulse | UDINT | Not yet implemented |
In | passivePulse | UDINT | Not yet implemented |
Out | busy | BOOL | Command is being executed |
Out | done | BOOL | Command is completed |
Out | error | BOOL | An error has occurred |
Out | errorID | UINT | Error ID, refer to A3BR_ERR_enum |
Out | errorString | String[80] | Description of error |
A3brGetIO
Read the value of an IO signal from the IRC. This block performs a one-time read operation upon rising edge of execute.
Direction | Name | Type | Description |
---|---|---|---|
In | ident | UDINT | a3br connection ident. Provided by A3brWebService |
In | execute | BOOL | Initiate a single read operation |
In | pSignal | STRING* | Pointer to a STRING containing the name of the IO signal as it appears on the IRC. Target string is required to be of length A3BR_IO_STR_LEN |
Out | value | INT | The value of the IO signal that was read from the IRC |
Out | busy | BOOL | Command is being executed |
Out | done | BOOL | Command is completed |
Out | error | BOOL | An error has occurred |
Out | errorID | UINT | Error ID, refer to A3BR_ERR_enum |
Out | errorString | String[80] | Description of error |
A3brSetSymbol
Write a value to a RAPID data symbol on the IRC. This block performs a one-time write operation upon rising edge of execute.
Direction | Name | Type | Description |
---|---|---|---|
In | ident | UDINT | a3br connection ident. Provided by A3brWebService |
In | execute | BOOL | Initiate a single write operation |
In | pSignal | STRING* | Pointer to a STRING containing the name of the RAPID data symbol as it appears on the IRC. Note that the full path of the symbol must be provided, in the form of “RAPID/{TaskName}/{ProgramName}/{SymbolName}”. Target string is required to be of length A3BR_SYMBOL_STR_LEN |
In | pValue | UDINT | Pointer to the value to be written to the RAPID data symbol |
In | szValue | UDINT | Size of the datatype to be written to the RAPID data symbol |
In | typeValue | A3BR_VAR_TYPE_enum | Type of the value to be written to the RAPID data symbol |
In | mode | UDINT | Not yet implemented |
In | delay | UDINT | Not yet implemented |
In | pulses | UDINT | Not yet implemented |
In | activePulse | UDINT | Not yet implemented |
In | passivePulse | UDINT | Not yet implemented |
Out | busy | BOOL | Command is being executed |
Out | done | BOOL | Command is completed |
Out | error | BOOL | An error has occurred |
Out | errorID | UINT | Error ID, refer to A3BR_ERR_enum |
Out | errorString | String[80] | Description of error |
A3brGetSymbol
Read the value of a RAPID data symbol from the IRC. This block performs a one-time read operation upon rising edge of execute.
Direction | Name | Type | Description |
---|---|---|---|
In | ident | UDINT | a3br connection ident. Provided by A3brWebService |
In | execute | BOOL | Initiate a single read operation |
In | pSignal | STRING* | Pointer to a STRING containing the name of the RAPID data symbol as it appears on the IRC. Note that the full path of the symbol must be provided, in the form of “RAPID/{TaskName}/{ProgramName}/{SymbolName}”. Target string is required to be of length A3BR_SYMBOL_STR_LEN |
In | pValue | UDINT | Pointer to the value to be read from the RAPID data symbol |
In | szValue | UDINT | Size of the datatype to be read from the RAPID data symbol |
In | typeValue | A3BR_VAR_TYPE_enum | Type of the value to be read from the RAPID data symbol |
Out | busy | BOOL | Command is being executed |
Out | done | BOOL | Command is completed |
Out | error | BOOL | An error has occurred |
Out | errorID | UINT | Error ID, refer to A3BR_ERR_enum |
Out | errorString | String[80] | Description of error |
A3brGetState
Read high level state information from the IRC. This includes the RAPID execution state, the RAPID cycle state, the control state, and the operational mode. All of these are read by this block upon rising edge of execute.
Direction | Name | Type | Description |
---|---|---|---|
In | ident | UDINT | a3br connection ident. Provided by A3brWebService |
In | execute | BOOL | Initiate a read of all IRC state information |
Out | rapidExecutionState | A3BR_RAPID_EXEC_ST_enum | Read out of current RAPID execution state |
Out | rapidCycleState | A3BR_RAPID_CYCLE_ST_enum | Read out of current RAPID cycle state |
Out | controlState | A3BR_CTRL_ST_enum | Read out of current control state |
Out | operationalMode | A3BR_OP_MODE_enum | Read out of current operation mode |
Out | busy | BOOL | Command is being executed |
Out | done | BOOL | Command is completed |
Out | error | BOOL | An error has occurred |
Out | errorID | UINT | Error ID, refer to A3BR_ERR_enum |
Out | errorString | String[80] | Description of error |
A3brIOWatch
Set up cyclic read/write watch for a list of IO signals on the IRC. The block will cyclically read the value of each configured IO signal as long as the enable is TRUE, and will also acyclically perform IO signal writes when the value on the PLC changes.
Direction | Name | Type | Description |
---|---|---|---|
In | enable | BOOL | Activate cyclic read/write functionality |
In | ident | UDINT | a3br connection ident. Provided by A3brWebService |
In | pSignals | STRING*[] | Pointer to an array of STRINGS containing the names of the IO signals. Each STRING is required to be of length A3BR_IO_STR_LEN |
In | pValues | INT* | Pointer to an array containing the values of the targeted IO signals. These provide read/write access to the user |
In | numSignals | USINT | The total number of signals |
In | maxCycleReads | USINT | (Optional) Limit the number of signals that are read in one cycle. If this is zero then numSignals are read each cycle |
In | refresh | TIME | Time between consecutive read series. Each time this time elapses the block attempts to read all configured IO signals once |
Out | busy | BOOL | Command is being executed |
Out | done | BOOL | Command is completed |
Out | error | BOOL | An error has occurred |
Out | errorID | UINT | Error ID, refer to A3BR_ERR_enum |
Out | errorString | String[80] | Description of error |
A3brProgramControl
(EXPERIMENTAL) Load RAPID programs and modules from the PLC into the IRC.
Direction | Name | Type | Description |
---|---|---|---|
In | ident | UDINT | a3br connection ident. Provided by A3brWebService |
In | loadProgram | BOOL | Load the RAPID string referenced by pData as a program into the specified task. Note that this will overwrite the existing program in that task |
In | loadModule | BOOL | Load the RAPID string referenced by pData as a module into the specified program. Note that this will overwrite existing modules with the same name, but will not overwrite the existing program or other modules in it |
In | pProgramName | UDINT | Pointer to a STRING containing the name of the target program on the IRC |
In | pModuleName | UDINT | Pointer to a STRING containing the name of the target module on the IRC |
In | pTaskName | UDINT | Pointer to a STRING containing the name of the target task on the IRC |
In | pData | UDINT | Pointer to a STRING containing the RAPID code to be loaded |
In | szData | UDINT | Size of the RAPID code to be loaded (i.e. length of the string) |
Out | busy | BOOL | Command is being executed |
Out | done | BOOL | Command is completed |
Out | error | BOOL | An error has occurred |
Out | errorID | UINT | Error ID, refer to A3BR_ERR_enum |
Out | errorString | String[80] | Description of error |