Skip to content

Commit

Permalink
Fix incorrect alarm main code, add new alarm info to troubleshooting …
Browse files Browse the repository at this point in the history
…guide, and remove extra whitespace in yaml file to pass linter.
  • Loading branch information
jimmy-mcelwain committed Sep 12, 2024
1 parent 8b3efa1 commit 9e7033f
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 11 deletions.
16 changes: 8 additions & 8 deletions config/motoros2_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -286,31 +286,31 @@ publisher_qos:
#ignore_missing_calib_data: false

#-----------------------------------------------------------------------------
# Should MotoROS2 broadcast debug messages?
# Should MotoROS2 broadcast debug messages?
#
# If enabled, this will broadcast log messages on the network on port UDP 21789.
# the user can use the debug script provided in the distribution of MotoROS2 to
# the user can use the debug script provided in the distribution of MotoROS2 to
# monitor the state of the robot, identify problems, and debug their code.
#
# The debug script is available under the Yaskawa-Global/motoros2 repository in
# The debug script is available under the Yaskawa-Global/motoros2 repository in
# the tools directory
# https://github.com/Yaskawa-Global/motoros2/tree/main/tools
#
# DEFAULT: true
#userlan_debug_broadcast_enabled: true

#-----------------------------------------------------------------------------
# Which network port should MotoROS2 broadcast the debug messages to, if
# Which network port should MotoROS2 broadcast the debug messages to, if
# 'userlan_debug_broadcast_enabled' is 'true'?
#
# If not specified and 'userlan_debug_broadcast_enabled' is true, MotoROS2 will
# send the broadcast to all network ports which are enabled on the controller.
# If not specified and 'userlan_debug_broadcast_enabled' is true, MotoROS2 will
# send the broadcast to all network ports which are enabled on the controller.
#
# To choose a specific port to broadcast debug messages, uncomment
# To choose a specific port to broadcast debug messages, uncomment
# 'userlan_debug_broadcast_port' below and set it to the desired port.
#
# NOTE 1: this setting only applies to YRC1000 and YRC1000u controllers.
# DX200 and FS100 controllers only have a single ethernet port, and will
# DX200 and FS100 controllers only have a single ethernet port, and will
# always default to USER_LAN1
#
# OPTIONS: USER_LAN1, USER_LAN2
Expand Down
51 changes: 51 additions & 0 deletions doc/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,35 @@ Save a copy of the output of the [debug-listener script](#debug-log-client) and
Open a new issue on the [Issue tracker](https://github.com/yaskawa-global/motoros2/issues), describe the problem and attach `PANELBOX.LOG` and the debug log to the issue.
Include a verbatim copy of the alarm text as seen on the teach pendant (alarm number and `[subcode]`).

### Alarm: 8011[64]

*Example:*

```text
ALARM 8011
Must enable ETHERNET function
[64]
```

*Solution:*
The ETHERNET function must be enabled for one (or both) LAN interface in the robot controller.
Please contact your local Yaskawa representative to request this function.

### Alarm: 8011[65]

*Example:*

```text
ALARM 8011
Enable LAN port 1 for debug
[65]
```

*Solution:*
The ETHERNET function must be enabled for the LAN interface that was specified in the config file.

Check failure on line 753 in doc/troubleshooting.md

View workflow job for this annotation

GitHub Actions / md_lint

Trailing spaces

doc/troubleshooting.md:753:99 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md009.md
Either change the interface specified in the config file to a LAN interface that is enabled, or enable the corresponding LAN interface on the controller.

Check failure on line 754 in doc/troubleshooting.md

View workflow job for this annotation

GitHub Actions / md_lint

Trailing spaces

doc/troubleshooting.md:754:154 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md009.md
Please contact your local Yaskawa representative to request the ETHERNET function if it is not enabled.

Check failure on line 755 in doc/troubleshooting.md

View workflow job for this annotation

GitHub Actions / md_lint

Trailing spaces

doc/troubleshooting.md:755:104 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md009.md

### Alarm: 8012[xx]

*Example:*
Expand Down Expand Up @@ -1024,6 +1053,28 @@ In case the alarm is still raised after calibration was performed, TF broadcasti
Open a new issue on the [Issue tracker](https://github.com/yaskawa-global/motoros2/issues), describe the problem and attach `PANELBOX.LOG`, `RBCALIB.DAT` and the debug log to the issue.
Include a verbatim copy of the alarm text as seen on the teach pendant (alarm number and `[subcode]`).

### Alarm: 8013[17]

*Example:*

```text
ALARM 8013
Bad UserLan debug port in cfg
[17]
```

*Solution:*
The `userlan_debug_broadcast_port` key in the `motoros2_config.yaml` configuration file is set to an invalid value.
Debug broadcasting will be disabled for this session.

On YRC1000 and YRC1000u, this must be set to either `USER_LAN1` or `USER_LAN2`.

No other values are supported.

Example: `userlan_debug_broadcast_port: USER_LAN1`.

After correcting the configuration, the [changes will need to be propagated to the Yaskawa controller](../README.md#updating-the-configuration).

### Alarm: 8014[0]

*Example:*
Expand Down
6 changes: 3 additions & 3 deletions src/Debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void Ros_Debug_Init()
debugPorts.enabledPortCount = count;
if (count < 1)
{
mpSetAlarm(ALARM_CONFIGURATION_FAIL, "Must enable ETHERNET function", SUBCODE_DEBUG_INIT_FAIL_MP_NICDATA_ALL);
mpSetAlarm(ALARM_ASSERTION_FAIL, "Must enable ETHERNET function", SUBCODE_DEBUG_INIT_FAIL_MP_NICDATA_ALL);
g_nodeConfigSettings.userlan_debug_broadcast_enabled = FALSE;
}
}
Expand Down Expand Up @@ -91,9 +91,9 @@ void Ros_Debug_SetFromConfig()
{
int ret = snprintf(message, ERROR_MSG_MAX_SIZE, "Enable LAN port %d for debug", g_nodeConfigSettings.userlan_debug_broadcast_port);
if (0 < ret && ret <= 32)
mpSetAlarm(ALARM_CONFIGURATION_FAIL, message, SUBCODE_DEBUG_INIT_FAIL_MP_NICDATA_SPECIFIC);
mpSetAlarm(ALARM_ASSERTION_FAIL, message, SUBCODE_DEBUG_INIT_FAIL_MP_NICDATA_SPECIFIC);
else
mpSetAlarm(ALARM_CONFIGURATION_FAIL, "Enable debug LAN port from cfg", SUBCODE_DEBUG_INIT_FAIL_MP_NICDATA_SPECIFIC);
mpSetAlarm(ALARM_ASSERTION_FAIL, "Enable debug LAN port from cfg", SUBCODE_DEBUG_INIT_FAIL_MP_NICDATA_SPECIFIC);
g_nodeConfigSettings.userlan_debug_broadcast_enabled = FALSE;
}
}
Expand Down

0 comments on commit 9e7033f

Please sign in to comment.