Purpose
Creates or opens a DIO file for editing in DioEasy application and return a reference to a DioDocument object.
Syntax
[obDocument = ] Object.Open ([enFileMode], [sFileName],[enDioBoardType], [dwSteps], [nChannels])
The Open method syntax has the following parts:
Name |
Type |
Description |
Object |
DioDocuments |
DioDocuments object |
enFileMode |
enumFileMode |
Optional - Integer specifying the type of access requested for the file. Default mode is dioFileModeCreate |
sFileName |
String |
Optional - File name, default name is “Dio.dio”. |
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 |
obDocument |
DioDocument |
DioDocument object |
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:
● Number of steps can be between 1024 and 1048576. Number of channels is constant 32.
● GX5150
● Number of steps can be between 1024 and 33,554,432 (32M) with number of channels must be 32.
● Number of steps can be between 1024 and 67,108,864 (64M) with number of channels must be 16 or 8.
● Number of steps can be between 1024 and 134,217,728 (131M) with number of channels must be eight.
See Also