Hello Guest it is May 10, 2021, 08:14:32 PM

Author Topic: Gcode run from mach but cat run from Api c#  (Read 270 times)

0 Members and 1 Guest are viewing this topic.

Gcode run from mach but cat run from Api c#
« on: January 02, 2020, 06:38:55 PM »
i use my interface to run mach4 from c# application by using the API
its work quit well ,until now i find one different ,from mach i can run files with Hebrew names ,but from Api must all files name only English
today i had very strange point ,one file that run without any problem from mach  ,when i try run it from Apii  ,run only the  movement
and skip over all M function
is some one had same problem?
thanks
yaakov
Re: Gcode run from mach but cat run from Api c#
« Reply #1 on: January 04, 2020, 05:44:06 PM »
i check again all day for test i cant find any different between the files that run from api and the file that cant
only one different
the file cant run from api(i mean not run the m function only run the gcode movement) size is 17kb
the files that can run was much more smaller
is that can be that the API cant use well when i have that size files?(17Kb its not so big only 1120 lines)
thanks
yaakov

Offline smurph

*
  • *
  •  1,400 1,400
  • "That there... that's an RV."
    • View Profile
Re: Gcode run from mach but cat run from Api c#
« Reply #2 on: January 05, 2020, 10:01:37 PM »
Make sure you are starting the C# application with the correct working directory (where Mach4core.dll resides). 

As far as non English strings is concerned, strings must be passed to the API as char * in C, but you can pass UTF8 strings in that parameter as well.  So don't convert from UTF8 to ASCII before passing the string but instead cast the UTF8 string to a char *.  I pretty much hate anything that is CLR from Microsoft so I have no idea how to do that in c#.

Steve