Platforms to show: All Mac Windows Linux Cross-Platform

/Dongle/Rockey/Rockey Read Test
Function:
Required plugins for this example: MBS Dongle Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Dongle/Rockey/Rockey Read Test
This example is the version from Sun, 17th Mar 2012.
Project "Rockey Read Test.xojo_binary_project"
MenuBar Menu
MenuItem UntitledMenu3 = ""
MenuItem UntitledMenu2 = "File"
MenuItem FileQuit = "Quit"
MenuItem UntitledMenu0 = "Edit"
MenuItem EditUndo = "Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cut"
MenuItem EditCopy = "Copy"
MenuItem EditPaste = "Paste"
MenuItem EditClear = "Clear"
End MenuBar
Class App Inherits Application
EventHandler Sub Open() mainwindow.test End EventHandler
End Class
Class MainWindow Inherits Window
Control List Inherits ListBox
ControlInstance List Inherits ListBox
End Control
Sub test() const RY_FIND = 1 const RY_FIND_NEXT = 2 const RY_OPEN = 3 const RY_CLOSE = 4 const RY_READ = 5 const RY_WRITE = 6 const RY_RANDOM = 7 const RY_SEED = 8 const RY_WRITE_USERID = 9 const RY_READ_USERID = 10 const RY_SET_MODULE = 11 const RY_CHECK_MODULE = 12 const RY_WRITE_ARITHMETIC = 13 const RY_CALCULATE1 = 14 const RY_CALCULATE2 = 15 const RY_CALCULATE3 = 16 const RY_DECREASE = 17 dim r as RockeyMBS dim ret,i as integer dim s as string write "Rockey Test." r=new RockeyMBS r.p1=&hc44c r.p2=&hc8f8 r.p3=&h0799 r.p4=&hc43b ret=r.Rockey(RY_FIND) write "Find: "+str(ret) ret=r.Rockey(RY_OPEN) write "Open: "+str(ret) write "Handle: "+hex(r.handle) //Write data to user memory write "read user memory:" //Read data form user memory r.p1=0 r.p2=24 // clear memoryblocks first bytes r.Buffer.Long( 0)=0 r.Buffer.Long( 4)=0 r.Buffer.Long( 8)=0 r.Buffer.Long(12)=0 ret=r.Rockey(RY_READ) write "Read: "+str(ret) if ret<>0 then write "FAILED "+str(ret) goto closing end if MsgBox r.Buffer.StringValue(0,20) closing: //Close rockey write "close rockey:" ret=r.Rockey(RY_CLOSE) write "Close: "+str(ret) if ret<>0 then write "FAILED" else write "SUCCESS" end if End Sub
Sub write(s as string) System.DebugLog s List.AddRow s End Sub
End Class
End Project

See also:

The items on this page are in the following plugins: MBS Dongle Plugin.


💬 Ask a question or report a problem
The biggest plugin in space...