The following example demonstrates how to use DioFile Object as follows:
Create a new DIO file
Insert new Board
Rename channels 0-31 as Data0 - Data31
Set number of steps to 1024
Set Clock and Strobe to internal
Set frequency to 5MHz
Set Trigger D Event and Mask
Set Trigger Event and Mask
Set Trigger Pause Event and Mask
Create Group of channels to fill
Create Block of data to filled
Fill with ramp
Past the block to the Dio file, stating at step 0 channel 0
Set the board type to match the file
Set the command to HALT at step 10 with no condition
Insert the command at step 10
Save and close the file
Dim diofile As New DioFile
Dim diofileboard As DioFileBoard
Dim dioblock As DioBlock
Dim diogroup As DioGroup
Dim diocommand As New DioCommand
dioFile.Open("DioComExampleFile.dio")
diofile.InsertBoard()
diofileboard = diofile.Board(0)
For i As Integer = 1 To 10
diofileboard.ChannelName(i) = "Data" + Str(i)
Next i
diofile.Steps = 1024
diofile.ClockStrobeSource = enumDioClockStrobeSource.dioClockStrobeInternal
diofile.Frequency = 5000000.0
diofile.TriggerDEvent = &HFF55
diofile.TriggerDMask = &HFFFF
diofile.TriggerTEvent = &HFF55
diofile.TriggerTMask = &HAAAA
diofile.TriggerPEvent = &H1234
diofile.TriggerPMask = &HFFFF
diogroup = diofile.CreateGroup(0, 31)
dioblock = diofile.CreateBlock(0, 1024, diogroup)
dioblock.FillRamp(0, 1023, 1, 2, 0, 1023, 0, 31)
dioblock.Paste(0, 0)
diocommand.BoardType = diofile.BoardType
diocommand.Set(diofile.BoardType, enumDioCommandOpCode.dioCommandOpCodeHalt, 10, enumDioCommandCondition.dioCommandConditionNone, 0)
dioblock.Command(10) = diocommand
diofile.Save()