The following example demonstrates how to use DioCommand Object as follows:
● Create a new DIO file
● Set number of steps to 1024
● 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.Steps = 1024
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()