.

Axis.GeneralIoAvailable

Determines if a configuration is available for a general I/O bit on an axis.

This property cannot be saved to flash memory.

Version History

Introduced in MPX 2.0.

Arguments

 
Argument Type Description
bit long The general I/O bit to test.
config IoConfig The configuration to test.

Type

Boolean (read only)

Index

 
Index Type Description
UInt32  

Visual Basic

Syntax

Property GeneralIoAvailable As Boolean(index As UInt32)

Sample Code

 
Dim xAxis As Mpx.Axis = controller.Axis(0)
Dim generalIo5Avail As Boolean = xAxis.GeneralIoAvail(5) ' Is I/O 5 available? 

If generalIo5Avail Then 
   ' Can I/O 5 be a digital input? And is I/O 5 not already an input?
   If xAxis.GeneralIoConfigAvail(5, Mpx.IoConfig.Input) And _ 
      xAxis.GeneralIoConfig(5) <> Mpx.IoConfig.Input Then

       ' Force I/O 5 to be a digital input
       xAxis.GeneralIoConfig(5) = Mpx.IoConfig.Input 
   End If 
End If 
            


Sample Application

 

C#

Syntax

bool[] GeneralIoAvailable;

Sample Code

 
Mpx.Axis xAxis = controller.Axis[0];
bool generalIo5Avail = xAxis.GeneralIoAvail[5]; // Is I/O 5 available? 

if (generalIo5Avail)
{
   // Can I/O 5 be a digital input? And is I/O 5 not already an input?
   if (xAxis.GeneralIoConfigAvail(5, Mpx.IoConfig.Input) && 
      xAxis.GeneralIoConfig(5) <> Mpx.IoConfig.Input)
   {
       // Force I/O 5 to be a digital input
       xAxis.GeneralIoConfig[5] = Mpx.IoConfig.Input;
   }
}
              

 

See Also

GeneralIoBit
GeneralIoConfig

 

       Legal Notice  |  Tech Email  |  Feedback
      
Copyright ©
2001-2021 Motion Engineering