ebook img

B&R AsHW PDF

10 Pages·0.033 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview B&R AsHW

AsHW AsHW Contents (9.6.2005) 1 AsHW...................................................................................................................................................................1 1.1 AsHW − General..................................................................................................................................1 1.1.1 AsHW − System Requirements..................................................................................................1 1.1.2 AsHW − Version History.............................................................................................................1 1.1.3 AsHW − Information for C Programmers....................................................................................1 1.1.4 AsHW − Supported target systems.............................................................................................2 1.1.5 AsHW − Error Numbers..............................................................................................................2 1.2 AsHW − Function blocks and functions................................................................................................2 1.2.1 AsHW − HwGetBatteryInfo().......................................................................................................2 1.2.1.1 Parameters........................................................................................................................2 1.2.1.2 Call syntax (Automation Basic).........................................................................................3 1.2.1.3 "ordinal" parameter............................................................................................................3 1.2.1.4 state Parameter.................................................................................................................3 1.2.2 AsHW − HwGetMode()...............................................................................................................3 1.2.2.1 Parameters........................................................................................................................3 1.2.2.2 Call syntax (Automation Basic).........................................................................................3 1.2.3 AsHW − HwGetNode()................................................................................................................3 1.2.3.1 Parameters........................................................................................................................4 1.2.3.2 Call syntax (Automation Basic).........................................................................................4 1.2.4 AsHW − HwGetTemperature()....................................................................................................4 1.2.4.1 Parameters........................................................................................................................4 1.2.4.2 Call syntax (Automation Basic).........................................................................................4 1.2.4.3 "ordinal" parameter............................................................................................................4 1.2.5 AsHW − HwSetUserLED()..........................................................................................................4 1.2.5.1 Parameters........................................................................................................................5 1.2.5.2 Call syntax (Automation Basic).........................................................................................5 1.3 AsHW − Data types and constants......................................................................................................5 1.3.1 AsHW − Constants.....................................................................................................................5 1.3.2 AsHW − Data types....................................................................................................................5 i AsHW ii 1 AsHW Information about the respective target system can be read using the AsHW library. Note: This library can only be used on SG4 target systems and only works beginning with operating system version AR V2.65. 1.1 AsHW − General Information about the respective target system can be read with this library. Note: Asynchronous handling causes the function blocks to continue returning the status ERR_FUB_BUSY until the FBK has either ended successfully or an error occurs. 1.1.1 AsHW − System Requirements Supported Platforms SG4 Operating System Requirements At least AR V2.65 1.1.2 AsHW − Version History Version Changes from earlier versions Function expansion: • HwGetNode(): Node numbers are read from the hardware tree for LS/IF cards (static value, determined once when booting. V1.01.5 IMPORTANT: Access takes place asynchronously. This FBK must be called several times before it returns a result. The FBK structure of HwGetNode() has changed. Corrections: • Temperature != 0 although status != 0 (ID# A&P 107050) • CANIO connected ended (ID# A&P 102755) V1.01.4 • Incorrect error number returned (ID# A&P 100565) Changes: • Unsupported FBKs removed. V1.01.3 "ordinal" parameter added to the HwSetUserLED FBK. V1.01.2 HwSetUserLED FBK added (beginning with AR 02.70 / G2.80). V1.01.1 Library supported for CP340. V1.01 Library supported for PP200. V1.00 First version The relationship between library versions, B&R Automation Studio versions, and system module versions can be found in the B&R Automation Studio online help. 1.1.3 AsHW − Information for C Programmers Header File AsHW.h C Library LibAsHW.a 1 AsHW 1 AsHW 1.1.4 AsHW − Supported target systems Function CP340 CP360 CP380 CP382 CP570 PP100 PP200 AC140 AR102 AR105 AR010 AR000 HwGetBatteryInfo HwGetTemperature HwGetMode HwGetNode HwSetUserLED Legend = Function supported on this target system = Function not supported on this target system 1.1.5 AsHW − Error Numbers Error number Constant Error description 0 ERR_READY FBK executed correctly with no errors 28850 ERR_ASHW_INVALID_DEVICE Invalid device 28851 ERR_ASHW_INVALID_ORDINAL Invalid ordinal number Desired function is not implemented yet in this 9999 ERR_NOTIMPLEMENTED (spserror.h) version 65535 ERR_FUB_BUSY FBK still working 1.2 AsHW − Function blocks and functions Information about the respective target system can be read using the AsHW library. Call Description HwGetBatteryInfo() Evaluates the state of the battery HwGetMode() Evaluates the mode switch position HwGetNode() Evaluates the node switch position HwGetTemperature() Evaluates the temperature state HwSetUserLED() User LED operation (available starting from AR O2.70 / G2.80) 1.2.1 AsHW − HwGetBatteryInfo() This function evaluates a device's battery state. Note: Asynchronous handling causes the function blocks to continue returning the status ERR_FUB_BUSY until the FBK has either ended successfully or an error occurs. 1.2.1.1 Parameters I/O Parameter Data type Description IN enable BOOL This function block is only executed if enable is <> 0. Hardware device name UDINT IN device (given as a pointer) Note: Only the following device string is supported at this time: "SL0.SS0.HW" IN ordinal USINT Ordinal number of the hardware element. Default 1. OUT status UINT Function result (return) (Error Number (0 = no error)) OUT state USINT Battery status 2 1.1.4 AsHW − Supported target systems AsHW 1.2.1.2 Call syntax (Automation Basic) HwGetBatteryInfo (enable, device, ordinal, status, state) 1.2.1.3 "ordinal" parameter Meaning of the ordinal number: CPU Ordinal number Description 1 Battery in the backplane 2 Battery in the CPU 1.2.1.4 state Parameter Possible battery states: Battery Status Value Description ASHW_BATTERY_LOW 0 Battery empty or not present ASHW_BATTERY_OK 1 Battery OK ASHW_BATTERY_NOTEST 2 Reserved (currently not used) ASHW_BATTERY_MISSING 3 Reserved (currently not used) 1.2.2 AsHW − HwGetMode() This function block evaluates the mode switch position. Note: Asynchronous handling causes the function blocks to continue returning the status ERR_FUB_BUSY until the FBK has either ended successfully or an error occurs. 1.2.2.1 Parameters I/O Parameter Data type Description IN enable BOOL This function block is only executed if enable is <> 0. Hardware device name UDINT IN device (given as a pointer) Note: Only the following device string is supported at this time: "SL0.SS0.HW" IN ordinal USINT Ordinal number of the hardware element. Default 1. OUT status UINT Function result (return) (Error Number (0 = no error)) OUT mode USINT Mode Switch 1.2.2.2 Call syntax (Automation Basic) HwGetMode (enable, device, ordinal, status, mode) 1.2.3 AsHW − HwGetNode() This function block evaluates the node switch position. Note: Asynchronous handling causes the function blocks to continue returning the status ERR_FUB_BUSY until the FBK has either ended successfully or an error occurs. 1.2.1.2 Call syntax (Automation Basic) 3 AsHW 1.2.3.1 Parameters I/O Parameter Data type Description IN enable BOOL This function block is only executed if enable is <> 0. Hardware device name UDINT IN device (given as a pointer) Note: Only the following device string is supported at this time: "SL0.SS0.HW" IN ordinal USINT Ordinal number of the hardware element. Default 1. OUT status UINT Function result (return) (Error Number (0 = no error)) OUT node USINT Node number (decimal) 1.2.3.2 Call syntax (Automation Basic) HwGetNode (enable, device, ordinal, status, node) 1.2.4 AsHW − HwGetTemperature() This function block evaluates the temperature state. Note: Asynchronous handling causes the function blocks to continue returning the status ERR_FUB_BUSY until the FBK has either ended successfully or an error occurs. 1.2.4.1 Parameters I/O Parameter Data type Description IN enable BOOL This function block is only executed if enable is <> 0. Hardware device name UDINT IN device Note: (given as a pointer) Only the following device string is supported at this time: "SL0.SS0.HW" IN ordinal USINT Ordinal number of the hardware element. Default 1. OUT status UINT Function result (return) (Error Number (0 = no error)) OUT temperature UDINT Temperature [1/10°C] 1.2.4.2 Call syntax (Automation Basic) HwGetTemperature (enable, device, ordinal, status, temperature) 1.2.4.3 "ordinal" parameter Meaning of the ordinal number: CPU Ordinal number Description 1 Cooling plate temperature 2 Module temperature 1.2.5 AsHW − HwSetUserLED() This function block is used to operate User LEDs. Note: Only available beginning with AR O2.70 / G2.80. 4 1.2.3.1 Parameters AsHW Note: Asynchronous handling causes the function blocks to continue returning the status ERR_FUB_BUSY until the FBK has either ended successfully or an error occurs. 1.2.5.1 Parameters I/O Parameter Data type Description IN enable BOOL This function block is only executed if enable is <> 0. Hardware device name UDINT IN device (given as a Note: pointer) Only the following device string is supported at this time: "SL0.SS0.HW" Ordinal number of the hardware element. E.g. PPx00 −> ordinal = 1 IN ordinal USINT Currently only supported for PP100 and PP200 devices −> ordinal must always be "1". 1 = Sets User LED (ASHW_USER_LED_ON) IN value USINT 0 = Clears User LED OUT status UINT Function result (return) (Error Number (0 = no error)) 1.2.5.2 Call syntax (Automation Basic) HwSetUserLED (enable, device, value, status) 1.3 AsHW − Data types and constants This section provides information about data types and constants included and used in this library. 1.3.1 AsHW − Constants The AsHW library provides the following constants: Name Data type Value Description Invalid ordinal ERR_ASHW_INVALID_ORDINAL UINT 28851 number ERR_ASHW_INVALID_DEVICE UINT 28850 Invalid device Reserved (currently ASHW_BATTERY_MISSING USINT 3 not used) Reserved (currently ASHW_BATTERY_NOTEST USINT 2 not used) ASHW_USER_LED_ON USINT 1 Battery empty or not ASHW_BATTERY_LOW USINT 0 present ASHW_BATTERY_OK USINT 1 Battery OK 1.3.2 AsHW − Data types The AsHW library does not provide any data types. 1.2.5.1 Parameters 5 AsHW 6 1.2.5.1 Parameters

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.