The following example demonstrates how to use DioFileBoard Object as follows:
Create a new DIO file
Insert new Board
Rename channels 0-31 as Data0 - Data31
Set number of steps to 1024
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
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()