Page 2 of 2

Re: 2 scripting lanuages ???

PostPosted: Fri Mar 30, 2018 9:03 am
by dezsoe
Vmax549 wrote:So which code is better C# or VB :twisted:

You would have had to be part of the great Mach3 flaming wars to appreciate that remark.

(;-) TP

This question is good. :) It can start war of religions. :) But don't forget: the two languages complie to the same object code, which is .net! In fact, there's no differece at the end, just the input syntax.

Re: 2 scripting lanuages ???

PostPosted: Fri Mar 30, 2018 9:28 am
by dezsoe
Robertspark wrote:It would be useful to see a semi complex macro (ie a few lines of code) in c# converted to VB so users could see what is involved.

Here are 2 macros with exactly same code. M20910 is in C#, M20912 is in VB. To run these macros you have to home the machine. These macros check the homing precision by rehoming the axes. If you run some stress test g-code and one of these macros, you can check if the homing went away.

Re: 2 scripting lanuages ???

PostPosted: Fri Mar 30, 2018 10:34 am
by Robertspark
Thanks Dezsoe :D Just what I was looking for {I thought you'd post something :D :D )

Re: 2 scripting lanuages ???

PostPosted: Tue Sep 05, 2023 6:53 pm
by tenfrozentoes
I know this is an old thread, but I currently use m20912. However my machine has a Y1 and Y2. Is there a flavor of this macro that would report each steppers count separately?

Re: 2 scripting lanuages ???

PostPosted: Tue Sep 05, 2023 9:17 pm
by dezsoe
It needs some testing. I don't have slaved axes, so I don't know how it works with them, but it's an interesting question. I'll be back in some days.

Re: 2 scripting lanuages ???

PostPosted: Wed Sep 06, 2023 8:47 pm
by tenfrozentoes
It certainly runs the macro through to completion. And it gives a readout for x y and z. I have tried to ascertain if the y-axis is reporting any kind of a compound number and it appears that the macro is only counting the y-axis steps. It seems to me it might be as simple as 'uncoupling' the Y and A(Y2) axis, execute the verification, and then recouple/reslave them again (this would induce some amount of racking- which in my case would cause the slightest amount of inaccuracy).

Of course there would need to be some safeguard against racking the carriage- which would most likely be case by case or machine specific.

I appreciate it greatly,

Re: 2 scripting lanuages ???

PostPosted: Sat Sep 16, 2023 1:17 pm
by A_Camera
Very weird thread... seems like a lot is missing from it.

Anyway, no VB or any other basic, please... it belongs to the previous century and should remain there.

Re: 2 scripting lanuages ???

PostPosted: Mon Sep 18, 2023 1:15 am
by tenfrozentoes
Adapting Camera - can you point me to another, more appropriate script/macro to achieve verify home/lost steps? I have received the solution to my lost steps on FB CNC for beginners group. But I'd still love to know a script to verify home for future use.
Thank you kindly.
Jim