Hi Scott, I had a go at populating a DRO, but I suppose you can guess how that went!
I tried the below code (bear in mind I am very green at the moment, so be gentle).
Can I put the entire code into the one button? So it populates the list and also checks to see which has been selected, therefore populating DRO's?
(The message lines are only so I could follow how far it's reading the code, it only displays the message 1)
Message "1"
Sub Main
Dim MyList$ (4)
MyList (0) = "Item 1"
MyList (1) = "Item 2"
MyList (2) = "Item 3"
MyList (3) = "Item 4"
MyList (4) = "Item 5"
Begin Dialog BoxSample 16,35,256,89,"Drop-Down List Box"
OKButton 204,24,40,14
CancelButton 204,44,40,14
DropListBox 124,24,72,40, MyList$( ),.DrpList
Text 124,12,68,8,"Drop-Down List Box:"
End Dialog
Message "2"
Dim Dlg1 As BoxSample
Button = Dialog ( Dlg1 )
End Sub
Message "3"
Select Case Dlg1
Case "Item 0"
SetUserDRO(1204,0)
Case "Item 1"
SetUserDRO(1204,1)
Case "Item 2"
SetUserDRO(1204,2)
Case "Item 3"
SetUserDRO(1204,3)
Case "Item 4"
SetUserDRO(1204,4)
Case "Item 5"
SetUserDRO(1204,5)
Case Else
End Select
Message "4"
On an unrelated note, I noticed you do training on Sure Servo Drives, are these easy/ish to interface with Mach3?
If so, I wouldn't mind doing some training, I know the basics of servos, but it would be good to learn it properly.