The following example demonstrates how to use DioBlock Object as follows:
Create a new DIO file
Set number of steps to 1024
Set Clock and Strobe to internal
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 diocommand As New DioCommand
Dim diofileboard As DioFileBoard
Dim dioblock As DioBlock
Dim diogroup As DioGroup
dioFile.Open("DioComExampleFile.dio")
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()