2 scripting lanuages ???

Post anything you want to discuss with others about the software.

2 scripting lanuages ???

Postby Vmax549 » Thu Mar 29, 2018 2:26 pm

Would it not have been wise to finish the first scripting interface before starting another ??

In C# we have NO macro editor and NO debugger.

Just a thought, (;-) TP
Vmax549
 
Posts: 1274
Joined: Sun Nov 22, 2015 3:25 am
Location: USA

Re: 2 scripting lanuages ???

Postby cncdrive » Thu Mar 29, 2018 2:38 pm

I think it will be helpful to have VB language for those who come from the Mach3 world.
On the UCCNC code side to make it possible to compile both languages is just a few extra lines of codes, because the .NET framework has both compilers and the .NET 4.0 supports dynamic variables, so it is about 15-20 lines of extra code only in the UCCNC, it is not a heavy extra project to have both compilers in work...

What do you mean by macro editor and debugger?
cncdrive
Site Admin
 
Posts: 2253
Joined: Tue Aug 12, 2014 11:17 pm

Re: 2 scripting lanuages ???

Postby Vmax549 » Thu Mar 29, 2018 2:54 pm

HI Balazs we have talked about this in the past. We need a macro editor that we can assemble and edit macro code. In the editor there would be a debugger so we can run/debug the code to test it.

There are still some timing issues in macros that need attention

It would also be nice if the Gcode editor was finished up.

Probing would be nice to be finished up with multi axis probing

Sub programming could use some attention with remote sub calls

G41/42 still needs some work.

I would be nice to get things finished up BEFORE jumping out into a lot of new features.

Just a thought, (;-) TP
Vmax549
 
Posts: 1274
Joined: Sun Nov 22, 2015 3:25 am
Location: USA

Re: 2 scripting lanuages ???

Postby cncdrive » Thu Mar 29, 2018 7:55 pm

Terry, I agree, but because for a long time many people coming from M3 were asking for VB macroing we through it is time to add it and since it took only a few hours of coding to add and to test it and made the application not much more complex we added this now.
cncdrive
Site Admin
 
Posts: 2253
Joined: Tue Aug 12, 2014 11:17 pm

Re: 2 scripting lanuages ???

Postby Vmax549 » Thu Mar 29, 2018 9:51 pm

OK so all the uccnc macro calls work in VB now?

(;-) TP
Vmax549
 
Posts: 1274
Joined: Sun Nov 22, 2015 3:25 am
Location: USA

Re: 2 scripting lanuages ???

Postby cncdrive » Thu Mar 29, 2018 10:10 pm

If the #VB word is in the first line of any macro then that macro is compiled with VB otherwise it is compiled C#.
cncdrive
Site Admin
 
Posts: 2253
Joined: Tue Aug 12, 2014 11:17 pm

Re: 2 scripting lanuages ???

Postby Robertspark » Thu Mar 29, 2018 11:16 pm

How much different is Cypress VB {Mach3 variant} from VB?
Rob
Einstein ― “If you can't explain it to a six year old, you don't understand it yourself”
...working my way through the 1000+ ways things don't work to find the one that does
UC400eth, UC300eth, UCCNC v1.2106, Neuron Lite
UCCNC v1.2105 Macro Manual
Robertspark
 
Posts: 968
Joined: Sat Sep 03, 2016 4:27 pm
Location: Nr Liverpool, England

Re: 2 scripting lanuages ???

Postby cncdrive » Thu Mar 29, 2018 11:44 pm

Hi Rob,

Unfortunatelly I have not much ideas about the Cypress VB syntax. The last time I wrote macro in it was probably 6-8years ago and I fully forgot it's syntax. :(
But the syntax in the UCCNC is Visual Basic, it is the exact same language and syntax as the .NET (Visual Studio) VB language, because the .NET built in compiler is used to compile the macros, but I'm also not using the Visual Studio VB compiler much, I'm more a C language guy.
Dezsoe is the VB expert. I only made some very simple VB macros for testing the compilations and the more serious tests were made by Dezsoe, because he is much more familiar with VB than me. His mother language is VB. :)
But again, the compiler itself is guaranteed to be OK, because it is not a compiler we wrote, but the .NET's VB compiler, we only wrote a few lines of codes into the UCCNC to use the already available compiler in the .NET framework.
cncdrive
Site Admin
 
Posts: 2253
Joined: Tue Aug 12, 2014 11:17 pm

Re: 2 scripting lanuages ???

Postby Vmax549 » Thu Mar 29, 2018 11:59 pm

Teh difference in Mach3 Cypress Enable and proper VB is like night and day (;-) VB is closer to C# than CE.

I tried a couple of Mach3 macro functions that were strictly CE and no mach3 code and UCCNC produced about 2 pages of errors. It ran fine in Mach3.

So if you grew up on CE then VB may be just as hard as learning C#.

Having only ONE scripting language definity has it advantage in code sharing.

But that is just me, Your mileage may vary (;-)

(;-) TP
Vmax549
 
Posts: 1274
Joined: Sun Nov 22, 2015 3:25 am
Location: USA

Re: 2 scripting lanuages ???

Postby cncdrive » Fri Mar 30, 2018 12:12 am

I'm not at all interested in fully learning or using VB. The last time I used basic to code was on Commodore 64, it was not yesterday. :)
But the option is now there and people who used to program in Visual Studio VB can now use the same programming language and syntax which they like and which they are familiar with.
Usually people who using VB are not using C based languages and vica versa, so we just made things easier for those who code in Visual Studio VB already and also who came from a Mach3 background for those people it will be still easier if they will not have to learn the C syntax if they never coded in C. For me C# and C++ are the programming languages and not the VB, but people are different.
Even if the Mach3 language is not exactly the same as the .NET VB compiler (I'm not sure about the differences), but then still for people who already knows something about the VB general syntax might be easier to convert things than to learn C#. Or at least this is what some people told me is why we made this option. And because it was not hard to add this option we did not have to consider not adding it when it only took a few hours for us to add it.

And the most important is that the #VB is just an option in the UCCNC now, anybody can select to use it or just ignore it and code in C#.
cncdrive
Site Admin
 
Posts: 2253
Joined: Tue Aug 12, 2014 11:17 pm

Next

Return to General discussion about the UCCNC software

Who is online

Users browsing this forum: stirling and 4 guests