Hello Guest it is April 25, 2024, 12:23:21 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - RikV

Pages: 1
1
CS-Lab / Re: Problems wit G31/M31 and subs
« on: May 16, 2018, 01:41:00 PM »
Well then,
That's clear. Thanks for all the help you two. I hope I can come back to you when I run into trouble again.

2
CS-Lab / Re: Problems wit G31/M31 and subs
« on: May 16, 2018, 04:20:15 AM »
OK, Gerry and "TPS",
I did indeed not mention "Var". Don't feel attacked in person. But what I am trying to say is that there is too little documentation on Mach3 and it is spread all over the www. Couldn't some good soul start a Topic to collect all usefull links on the subject? Encourage people to add to the Wiki?
There should be a CD with sample soft included with "Cypress Enable". Anyone knows where I can find it?
Nevertheless I still have no answer to my initial question: why does that bit of code not work when placed in a subroutine? The variables are declared Global.
Is it possible to make a cross reference list on screen sets, macros and Brains of LED, Button, DRO and Vars?

3
CS-Lab / Re: Problems wit G31/M31 and subs
« on: May 15, 2018, 03:40:29 AM »
Gerry,
DRO 2000... 2002 are the ones originally used by G31? Or am I wrong? SO, if they are, they can't be used for anything else and shouled at least be "reserved" DRO.
Therefore I was wondering how many and which other DRO, button and LED there are around I am not aware of.
And how can one make an inventory of used items on a screenset?
I will try yous suggestion, but this couple of lines appear many times in my script and thus belongs in a subroutine. And even when it works this way I would feel very unsatisfied not knowing WHY it doen not work the right way. See, I am someone who wants to KNOW why thins work or not.

4
CS-Lab / Re: Problems wit G31/M31 and subs
« on: May 14, 2018, 05:41:30 PM »
Hello Gerry,
I am aware of the Wiki, but it just doesn't give a clue to why thi bit of code is not working. In general, I think the documentation of the soft is very weak. Where, for example, can I find that DROs 2000...2002 are used by the system? How many others are there? This is not documented, how can we be expected to write consistent code this way?

5
CS-Lab / Problems wit G31/M31 and subs
« on: May 14, 2018, 09:50:42 AM »
I have Mach3 v3.043.062 wit CSMIO-S and for the moment I am using the standard 1024.set.
After srtuggling with G31/M31 on some offset-macros I ended up with the following problem:
At the very end of the script I want to restore the changed parameters to their Original state (quite Obvious I think). But I cannot get this elementary and certainly most simple thing to work!
All documentation I find on DRO, LED and BUTTONs says the same: OEMLED(48) is true when G90 is active. And yet this does not work??

Code: [Select]
Dim CurrentFeed As Double
Dim CurrentAbsInc, CurrentGmode As Boolean

Sub Main()

CurrentFeed     = GetOemDRO(818) 'Get the current feedrate to return to later
CurrentAbsInc  = GetOemLED(48) 'Get the current G90/G91 state
CurrentGmode = GetOemDRO(819) 'Get the current G0/G1 state


code "G90"
code "F100"


ReturnG90G91State 'subroutine'


End Sub

Sub ReturnG90G91State()
If CurrentAbsInc = True Then 'if G91 was in effect before then return to it
Code "G90"
End If
If CurrentGMode = 0 Then 'if G0 was in effect before then return to it
Code "G0"
End If
   Code "F" &CurrentFeed 'restore starting feed rate
End Sub     

I don't know if it is my own fault, but I believe teh available "official" documentation on writing scripts is not at all clear. IS there more/better on the net?
Is there anywhere a COMPLETE detailed list of DRO, LED and BUTTONS? One that goes beyond OEM(1000)?

Pages: 1