Hello Guest it is March 28, 2024, 07:05:19 AM

Author Topic: confusion over DRO numbering  (Read 4899 times)

0 Members and 1 Guest are viewing this topic.

Re: confusion over DRO numbering
« Reply #10 on: August 20, 2016, 08:03:49 AM »
Hi ger21,
will try them out tomorrow.

I imagined that encodersX-Z would affect the multifunction displays and so decided against
using them. For my purpose provided multifunction X actually reflects X position and at least
one other reflects the number of turns wound that would be fine.

I encountered another issue which baffled me. I was stepping thru my macro and found that
the turns counter would increment despite not having rotated at all, I'm turning it by hand
while testing. In the Ports/Pins page I nominated count/unit as 96 but left velocity at its default
of 100. It has occurred to me that it may be causing my counter to increment unexpectedly.
Again will have to wait until tomorrow to test.

I'm grateful that you have taken the time to reply, your assistance has helped me along the path
considerably.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: confusion over DRO numbering
« Reply #11 on: August 21, 2016, 02:30:33 AM »
Hi All,
had some pretty good success. Have managed to write and run a simple
coilwinding script.

Still haven't had any luck trying to set or reset DROs 140 thru 146 or 170 thru 176
using setOEMDRO(n,0.0). Beginning to think that they can't be written to directly
a bit like some of the coord positions on the diagnostics page, you can highlight them
write in the cell and Enter but the coord reverts to whatever it was. To change a coord
you need to change the underlying data which are used to calculate the coord concerned.

The simple expedient is to preread the DRO and store its initial value and subtract within the
body of the script.

The second issue where DRO(173) would increment at each read despite DRO(143) from which it
is calculated not changing still perplexes me. Despite setting the velocity component in Ports/Pins to zero it
still behaves as if it has a velocity component.

The way around it was just to read DRO(143), the raw encoder count, and divide by the counts/unit
value.

The last thing I encountered was that I was using a while loop until the turns counter reached 500
and if for any reason I could not achieve the magic 500, broken wire, the house catches on fire or
whatever I could of course Estop but could not prevent the script from running at reset. In the event
I crashed Mach several times and had to reboot the controller, not ideal! I had to add an 'abort' function
in the loop.

I have a running script, 'yehay', it might not be elegant, efficient or robust but it works. I can get on with
the project and have learnt some new stuff on the way.

This hobby is one very big learning experience.... and it doesn't seem to stop! I am delighted to have learnt
at least a little VB, the flexibility and power that it brings to Mach can't be understated.

This leads me to my next question. I have written a script that takes a Gcode text file and processes a correction.
The script works very well as is and surprisingly fast at processing files of 500k.
I have used a textbox to input the path and filename but it is pretty tiresome and mistake prone. Is there a
'browse' function/object in VB that I might use?

Craig

'I enjoy sex at 73.....I live at 71 so its not too far to walk.'