Output General Purpose Output Signal

Example) Set and output the general-purpose output signal data for axis number 1.
    Output 1 to the OUT1 bit.

■ C

long Ret;
short Id;
short OutData ;
short OutDataEnable ;
OutData = 1;
OutDataEnable = 1;

// Set general output signal data.
Ret = SmcWSetDigitalOut( Id , 1, OutData , OutDataEnable );
 

■ Visual Basic

Dim Ret  As Integer
Dim Id   As Short
Dim OutData As Short
Dim OutDataEnable As Short
OutData = 1
OutDataEnable = 1

' Set general output signal data.
Ret = SmcWSetDigitalOut( Id , 1, OutData , OutDataEnable )
 

■ C#

int Ret;
short Id;
short OutData ;
short OutDataEnable ;
OutData = 1;
OutDataEnable = 1;

// Set general output signal data.
Ret = Smc.WSetDigitalOut( Id , 1, OutData , OutDataEnable );
 

■ Python

Ret = ctypes.c_long()
Id = ctypes.c_short()
OutData = ctypes.c_short()
OutDataEnable = ctypes.c_short()
OutData.value = 1
OutDataEnable.value = 1

# Set general output signal data.
Ret.value = csmc.SmcWSetDigitalOut( Id , 1, OutData , OutDataEnable )