. |
Bit Input Mechaware API Documentation >Input
OverviewOverviewDescription The Bit Input block is used for discrete bit inputs from internal firmware variables. Any internal variable on the controller can be used as a MechaWare bit input using the Bit Input block. The Memory Address defines the input internal variable location. The data type of the internal variable can be float (32 bits), double (64 bits), short integer (16 bits), integer (32 bits), and long integer (64 bits). The Bit Number defines which bit should be used for the input. Bit 0 is always the LSB for the input. The MSB depends on the word type: 15 for short integer, 31 for float and integer, and 63 for double and long integer. Note: The Output is a double-precision floating point value, represented strictly as either 0.0 or 1.0 (effectively right justifying the extracted bit). The input is written at the update rate specified by the Evaluate Block. Example
The configuration values for this block are as follows:
Matlab/SimulinkSimulink InterfaceThe Memory Address of the Bit Input specifies which memory location is read to obtain the input. The address is in hexadecimal format. Addresses for input variables is obtained by using VM3. The Bit Number defines which bit should be used for the input. Bit 0 is always the LSB for the input. The MSB depends on the word type: 15 for short integer, 31 for float and integer, and 63 for double and long integer. The block has two user data fields (User Data 0, User Data 1) to store application-specific data for convenient storage and retrieval. For more information, see User Data Storage. The block's update schedule is determined by the Evaluate Block. The following Parameter Dialog Box can be opened by double-clicking on the block in a Simulink model:
C++ APIBIT_INPUTBlockDeclaration Public Method
Description The BIT_INPUT block is used for inputs other than those provided by the standard input blocks. Any internal variable on the controller can be used as a MechaWare input using the Bit Input block. See Overview for more information Parameters
Methods See Also
|
| | Copyright © 2001-2012 Motion Engineering |