Open Method (DioFile)

Applies To

All

Purpose

Creates or opens a DIO file for editing..

Syntax

Object.Open ([sFileName], [enFileMode], [enDioBoardType], [dwSteps], [nChannels])

 

The Open method syntax has the following parts:

Name

Type

Description

Object

DioFile

DioFile object

sFileName

String

Optional - File name, default name is “Dio.dio”.

enFileMode

enumFileMode

Optional - Integer specifying the type of access requested for the file. Default mode is dioFileModeCreate

enDioBoardType

enumDioBoardType

Optional - Integer specifying the board type. Default board type is dioBoardTypeGX5050.

dwSteps

DWORD

Optional - Number of steps in the new file. Default number of steps is 16384 (16K).

nChannels

SHORT

Optional - Number of channels in the new file. Default number of channels is 32

 nBoards

SHORT

Optional - Number of boards in the new file, max number of board is 8 (Master and seven Slaves). Default is one board.

Where

enumFileMode can be one of the following:

Name

Value

Description

dioFileModeRead

0

Read only. If the file does not exist or cannot be found the function call fails.

dioFileModeReadWrite

1

Read and Write. The file must exist

dioFileModeCreate

2

Creates a new file. If the file exists, the function overwrites the file and clears the existing attributes.

enumDioBoardType can be one of the following:

Name

Value

Description

dioBoardTypeGX5150

0x20

Board type is GX5150

dioBoardTypeGC5050

0x30

Board type is GC5050

dioBoardTypeGX5152

0x40

Board type is GX5152

dioBoardTypeGX5050

0x50

Board type is GX5050

dioBoardTypeGX5055

0x55

Board type is GX5055

dioBoardTypeGX5280

0x60

Board type is GX5280

dioBoardTypeGX5290

0x70

Board type is GX5290

dioBoardTypeGX5290E

0x75

Board type is GX5290E

Comments

The total number of channels and steps follow these guidelines:

GX5050/GC5050:

GX5150:

Creating a new file creates a DIO file with a single master board. The file will have the default settings as follows (All Boards):

GX5150:

 

See Also

InsertBoard, InsertSteps