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:
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 8.
Creating a new file creates a DIO file with a single master board. The file will have the default settings as follows (All Boards):
Frequency: 5MHz
B Clcck: 5 MHz
Clock: Internal
Strobe source: Internal
StrobeTiming: 10 nSec
TriggerMode: Disabled
TriggerMask: 0xFFFF
DEvent: 0
DMask: 0xFFFF
PauseEvent: 0
PauseMask: 0xFFFF
XEvent: 0xFFFF
TriggerEvent:0
XSource: External
GX5150:
Direction: Input
RegisterA: 0
RegisterB: 0
See Also