SmcWSetCtrlInOutLog


Function

Sets the logic of I/O control signal.

Format

Ret = SmcWSetCtrlInOutLog( Id, AxisNo, CtrlInOutLog )

Parameters

Id [ VB.NET: Short ] [ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short ]
SSpecify the Deice ID retrieved by SmcWInit function.

AxisNo [ VB.NET: Short ] [ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short ]
Specify the axis number.

CtrlInOutLog [ VB.NET: Short ] [ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short ]
Set the logic of I/O control signal.

[ 0 | 0 | 0 | 0 | 0 | OUT3 | OUT2 | OUT1| LIM | IN7 | IN6 | IN5 | IN4 | IN3 | IN2 | IN1 ] Setting range:0 to 7FF (Hex)

Signal description

IN1 to IN7

Control input signals

LIM

Limit signal

OUT1 to OUT3

Control output signals

Setting values

0

Negative logic

1

Positive logic

Return Value

Ret [ VB.NET: Integer ] [ C, C++: long ] [ C#: int ] [ Python: ctypes.c_long ]

0

Terminated normally

Non-zero

Terminated abnormally

See also: Error code details

Initial Value

0 : Negative logic for all signals

Remarks

This function cannot be executed when the device is in operation.

After "Initial Setting function" is executed, it is necessary to execute SmcWSetInitParam.
Refer to "About Initial Setting function".

Example

The control I/O signal logic of axis number 1 is set.
IN2 is set in the positive logic and all of another is set to negative-true logic.

VB.NET
Dim Ret As Integer
Dim CtrlInOutLog As Short
CtrlInOutLog = 2
Ret = SmcWSetCtrlInOutLog( Id , 1, CtrlInOutLog )

C, C++
long Ret;
short CtrlInOutLog ;
CtrlInOutLog = 2;
Ret = SmcWSetCtrlInOutLog( Id , 1, CtrlInOutLog );

C#
int Ret;
short CtrlInOutLog ;
CtrlInOutLog = 2;
Ret = Smc.WSetCtrlInOutLog( Id , 1, CtrlInOutLog );

Python
Ret = ctypes.c_long()
CtrlInOutLog = ctypes.c_short()
CtrlInOutLog.value = 2
Ret.value = csmc.SmcWSetCtrlInOutLog( Id , 1, CtrlInOutLog )

See Also

SmcWGetCtrlInOutLog