FillShift Method (DioBlock)

Applies To

All

Purpose

Shift / Rotate a range of channels and steps.

Syntax

Object.FillShift ([enDioFillShiftType], [enDioFillShiftDirection], [dwFirstValue], [dwCount], [dwCycleWidth], [enDioFillValueType], [vFirstStep], [dwSteps], [vFirstChannel], [vLastChannel])

 

The FillShift method syntax has the following parts:

Name

Type

Description

Object

DioBlock

DioBlock object

enDioFillShiftType

enumDioFillShiftType

Optional - Integer specifying the shift method, default is dioFillShiftTypeShift.

enDioFillShiftDirection

enumDioFillShiftDirection

Optional - Integer specifying the shift direction. Default is dioFillShiftDirectionLeft.

dwFirstValue

DWORD

Optional - Starting value Default is 1

dwCount

DWORD

Optional - The number of shifts per step. Default is 1

dwCycleWidth

DWORD

Optional - Cycle Width (in Steps) is the number of steps to complete a clock cycle (must be greater than the Invert after Step entry). Default is 2.

enDioFillValueType

enumDioFillValueType

Optional - Integer specifying the shift value type. This value is valid only when enumDioFillShiftType = 0 (i.e. Shift). Default is dioFillValueZero.

vFirstStep

Variant

Optional - Starting step number in the block. Step number specified by either the step label or the step number. Default is the first step.

dwSteps

DWORD

Optional - Number of steps. Default is all steps

vFirstChannel

Variant

Optional - First channel number in the block. Channel number specified by either channel label or the channel number. Default is the first channel.

vLastChannel

Variant

Optional - Last channel number in the block. Channel number specified by either channel label or the channel number. Default is the last channel.

Where

enumDioFillShiftType can be one of the following:

Name

Value

Description

dioFillShiftTypeShift

0

Shift

dioFillShiftTypeRotate

1

Rotate.

 

enumDioFillShiftDirection can be one of the following:

Name

Value

Description

dioFillShiftDirectionLeft

0

Shift

dioFillShiftDirectionRight

1

Rotate.

 

enumDioFillValueType can be one of the following:

Name

Value

Description

dioFillValueZero

0

Fill value is Zero.

dioFillValueOne

1

Fill value is One.

dioFillValueIgnore

2

Fill with ignore.

dioFillValueInvert

3

All specified steps values will be inverted.

dioFillValueFirstStep

4

Fill value will be taken from the first step value

dioFillValueCheckerBoard

5

Fill value will alternate between 0xA to 0x 5 for each specified step.

dioFillValueByUser

6

Fill value is specified by the user.

Comments

If enDioFillShiftType selected is DioFillShiftTypeRotate, then the value shifted out of the last channel fills the first channel. Then New Cells Value (Shift) is not available.

This command fills the first step of the specified channels with the binary value entered in dwFirstValue value. It then shifts the data in each cell left or right according to enumDioFillShiftDirection. The value of the vacated bit position depends on the enumDioFillShiftType and enumDioFillValueType value (Shift only) selection.

If enumDioFillShiftType is DioFillShiftTypeShift, then the value shifted out of the end channel is lost and the value selected in New Cells Value (Shift) fills the beginning channel.

Shift/Rotate (number) dwCount specifies the number of shifts per step, i.e. determines the number of steps between shifts.

 

See Also

FileFirstStep