SmcWGetPulseType


Function

Retrieves the settings of output mode of pulse.

 

Format

Ret = SmcWGetPulseType( Id, AxisNo, PulseMode, DirTimer )

 

Parameters

Id [ C, C++: short ] [ Python: ctypes.c_short ]

Specify the device ID retrieved by SmcWInit function.

 

AxisNo [ C, C++: short ] [ Python: ctypes.c_short ]

Specify the axis number.

 

PulseMode [ C, C++: short * ] [ Python: ctypes.POINTER(ctypes.c_short) ]

Specify the address of a variable to store the output mode of pulse.

 

Pulse mode

(+)direction operates

(-)direction operates

 

OUT output

DIR output

OUT output

DIR output

0

Common pulse mode OUT:Negative logic, CDIR+:High, CDIR-:Low

1

Common pulse mode OUT:Positive logic, CDIR+:High, CDIR-:Low

2

Common pulse mode OUT:Negative logic, CDIR+:Low, CDIR-:High

3

Common pulse mode OUT:Positive logic, CDIR+:Low, CDIR-:High

4

2-pulse mode :Negative logic

5

2-pulse mode :Positive logic

6

Phase difference mode OUT of 90 degrees: It is willingly signal. DIR: Delay

signal

7

Phase difference mode OUT of 90 degrees: Delay signal. DIR: It is willingly a

signal

 

DirTimer [ C, C++: short * ] [ Python: ctypes.POINTER(ctypes.c_short) ]

Specify the address of a variable to store the value that indicates whether waiting (delay) or not.

0

OFF

1

ON

 

Return Value

Ret [ C, C++: long ] [ Python: ctypes.c_long ]

0

Terminated normally

Non-zero

Terminated abnormally

See also: Error code details

 

Initial Value

PulseMode

4 : 2-pulse mode : Negative logic

DirTimer

1 : ON

 

Remarks

This function can be executed even if the device is in operation.

 

Example

The set up information of the pulse output mode of axis number 1 is acquired.

 

C, C++

long Ret;

short PulseMode ;

short DirTimer ;

Ret = SmcWGetPulseType( Id , 1, &PulseMode , &DirTimer );

 

Python

Ret = ctypes.c_long()

PulseMode = ctypes.c_short()

DirTimer = ctypes.c_short()

Ret.value = csmc.SmcWGetPulseType( Id , 1, ctypes.byref(PulseMode) , ctypes.byref(DirTimer) )

 

See Also

SmcWSetPulseType