SmcWGetPulseStatus


Function

Retrieves pulse output status.

 

Format

Ret = SmcWGetPulseStatus( Id, AxisNo, PulseSts )

 

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 axis number.

 

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

Specify the address of the variable that stores the pulse output status.

 

0

During pulse output stop

1

A fixed velocity is operating at the beginning speed (FL speed) .

2

A fixed velocity is operating at the speed of the target (FH speed) .

3

Synchronous start waiting

4

ERC timer completion waiting

5

Direction change timer completion waiting

6

Acceleration is operating.

7

The deceleration is operating.

8

INP input waiting state

9

PA/ PB input waiting state

 

Return Value

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

0

Terminated normally

Non-zero

Terminated abnormally

See also: Error code details

 

Remarks

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

 

Example

The pulse output of axis number 1 is acquired.

 

C, C++

long Ret;

short PulseSts ;

Ret = SmcWGetPulseStatus( Id , 1, &PulseSts );

 

Python

Ret = ctypes.c_long()

PulseSts = ctypes.c_short()

Ret.value = csmc.SmcWGetPulseStatus( Id , 1, ctypes.byref(PulseSts))

 

See Also