Hello Guest it is March 28, 2024, 09:03:06 AM

Author Topic: Mach4 to C/C++ transport  (Read 2053 times)

0 Members and 1 Guest are viewing this topic.

Mach4 to C/C++ transport
« on: April 17, 2019, 03:49:11 PM »
Hi!
I have some problem with Mach4 and C/C++.
When I connect to ESS broad with Mach4 API I have some strange errors like -17, 0 , or some text, but I can't find documetation for this, and what errors I doing in my code( I think at first I need to do init, but I don't know how).
Where I can find c/c++ code samples? Chm file not so exhaustive, as i thought.
So: what I doing wrong?
2) Where I can find error explain file
3) Is there C/C++  code samples?

Thanks.
Re: Mach4 to C/C++ transport
« Reply #1 on: April 17, 2019, 04:18:29 PM »
Hi,
this post should probably be in the Mach4 General Discussion board, it will get more replies.

Firstly scripting in Mach4 is done in Lua. The ZeroBrane editor and Lua compiler are built in whereas there is no C/C++
editor or compiler. Any C/C++ code has to be written and compiled externally to Mach4.
Plugins are written in C/C++ but all scripts are in Lua.

The API.chm gives both C/C++ syntax and Lua syntax because by and large the API is used in scripts
and plugins.

I have attached a couple of useful text files.  One is the Mach4 return code number to Enum. The other is
the Mach4 state number to Enum. These two files are so useful I put them into Mach4Hobby/Docs folder
which will mean that they are available from the <Help Docs> button of the File Ops tab in Machs screen.

I will shortly post a link to poppabear's (Scott's) posts which have various Enums and pound variable lists. They have proven
so useful I have put them in the Docs folder also.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Mach4 to C/C++ transport
« Reply #2 on: April 17, 2019, 04:27:30 PM »
Hi,
as promised links to poppabear's posts:

https://www.machsupport.com/forum/index.php?topic=27396.msg193456#msg193456

https://www.machsupport.com/forum/index.php?topic=30323.msg210742#msg210742

poppabear has quite a few posts in the Mach4ToolBox daughter board. poppabear was very active in the early Mach4
days but has been absent from the forum since. Some of the posts are pretty dated....but any info is
appreciated...thanks Scott.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Mach4 to C/C++ transport
« Reply #3 on: April 18, 2019, 04:43:16 PM »
Well, thanks. Is there some C++ examples? Cause I have problem with conection or some else problems
Re: Mach4 to C/C++ transport
« Reply #4 on: April 18, 2019, 04:51:22 PM »
Hi,
most of the example code fragments in the API.chm are all C/C++ syntax.

There are no examples of C/C++ code in Mach4. All C/C++ code has been compiled already and most of it
is proprietary and you would not be permitted to view it anyway.

Mach4Hobby/LuaExamples is full of Lua examples.

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