<< Prev        Next >>

ID : 7284

GetDiagnosisState

Function

This command obtains the diagnosis motion status (for all axes).

This is available in Ver. 2.6.* or later.

Syntax

GetDiagnosisState

Return value

Return the diagnosis motion status (for all axes) with Variant type data (eight elements).

The value of each element is as follows:

Value Description
0 Enforced
1 Non-enforce

The element number "0" corresponds to the 1st axis, "1" to the 2nd axis, "2" to the 3rd axis, and so on. The last element number "7" corresponds to the 8th axis, but the 7th and 8th axes currently contain "0" as they are reserved for future extension.

Description

Return the diagnosis motion status (for all axes) with Variant type data (eight elements).

Attention

-

Example

Sub Main

  'Display the axis number of an axis with the diagnosis motion set to Non-enforce
  Dim WarningAxis As Variant
  
  'An axis with the diagnosis motion set to Non-enforce is found
  If GetDiagnosisWarning Then
    WarningAxis = GetDiagnosisState

    'When the status of the 1st axis is Non-enforce
    If WarningAxis( 0 ) Then
      Msgbox "1st axis is Non-enforce."
    End If

    'When the status of the 2nd axis is Non-enforce
    If WarningAxis( 1 ) Then
      Msgbox "2nd axis is Non-enforce."
    End If

    'When the status of the 3rd axis is Non-enforce
    If WarningAxis( 2 ) Then
      Msgbox "3rd axis is Non-enforce."
    End If

    'When the status of the 4th axis is Non-enforce
    If WarningAxis( 3 ) Then
      Msgbox "4th axis is Non-enforce."
    End If

    'When the status of the 5th axis is Non-enforce
    If WarningAxis( 4 ) Then
      Msgbox "5th axis is Non-enforce."
    End If

    'When the status of the 6th axis is Non-enforce
    If WarningAxis( 5 ) Then
      Msgbox "6th axis is Non-enforce."
    End If

  End If

End Sub

ID : 7284

<< Prev        Next >>