GAME_PAD (10004)
GAME_PAD (10004)
ID 10004
Application: |
SIM |
Group: I/O
Short description:
Function that downloads data from the game pad.
Inputs (1):
no. |
type |
impulse |
mark |
notes |
1 |
B |
no |
enable |
Enabling the output updates with the gamepad states |
Outputs (22):
no. |
type |
impulse |
mark |
notes |
1 |
B |
no |
button_1 |
Active when the Button 1 is pressed |
2 | B | no | button_2 | Active when the Button 2 is pressed |
3 | B | no | button_3 | Active when the Button 3 is pressed |
4 | B | no | button_4 | Active when the Button 4 is pressed |
5 | B | no | button_5 | Active when the Button 5 is pressed |
6 | B | no | button_6 | Active when the Button 6 is pressed |
7 | B | no | button_7 | Active when the Button 7 is pressed |
8 | B | no | button_8 | Active when the Button 8 is pressed |
9 | B | no | button_9 | Active when the Button 9 is pressed |
10 | B | no | button_10 | Active when the Button 10 is pressed |
11 | B | no | button_11 | Active when the Button 11 is pressed |
12 | B | no | button_12 | Active when the Button 12 is pressed |
13 | B | no | button_13 | Active when the Button 13 is pressed |
14 | B | no | button_14 | Active when the Button 14 is pressed |
15 | B | no | button_15 | Active when the Button 15 is pressed |
16 | B | no | button_16 | Active when the Button 16 is pressed |
17 | I | no | axis_1 | Joystick position - axis 1 |
18 | I | no | axis_2 | Joystick position - axis 2 |
19 | I | no | axis_3 | Joystick position - axis 3 |
20 | I | no | axis_4 | Joystick position - axis 4 |
21 | B | no | error | Error signal |
22 | I | no | err_id |
Error ID: err_id = 0 - no error err_id = 1 - block not configured (no gamepad selected) err_id = 2 - gamepad unavailable |
Settings:
no. |
type |
mark |
notes |
1 |
- |
Gamepad |
Gamepad name (Note! This setting is not saved in project files and user blocks. Each time a project is loaded or a user block containing GAME_PAD is inserted, the block must be reconfigured.) |
Function operation:
The GAME_PAD function downloads data from the game pad. High state on the enable input activates the update of outputs with gamepad states. Warning! The arrangement of buttons and the range of values on the axis_1, axis_2, axis_3 and axis_4 outputs depends on the device model.
R registers and M markers used: none