loading
 
variables
krishna Ramineni from India  [1 posts]
8 year
Hi,
I am using the following code to get some values in mach3 cnc application ,but not getting the values and giving error like not defined variable .

i would like to get the values of COG_X and COG_Y from roborealm API to mach3 software.
Please advise me .
Thank You
Kris

Option Explicit
Set rr = CreateObject("Roborealm.API.1")

If Not rr.connect("localhost",6060) Then
  MsgBox("Could not connect to RoboRealm Server")
  rr.Close
  End
Else
  MsgBox("Connected")
End If

rr.cogx1 = getvariable (COG_X)



MsgBox("Image x Value" & COG_X)



Steven Gentner from United States  [1446 posts] 8 year
Krishna,

The name of the variable should be in quotes and reference the COM object:

Dim cogx1
cogx1 = rr.getvariable("COG_X")

MsgBox("Image x Value" & cogx1)

For mach3, also see the following post:

http://www.roborealm.com/forum/index.php?thread_id=5375#1

STeven.

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index