Hello Guest it is November 13, 2019, 01:42:33 AM

Author Topic: API Function Codes Help  (Read 582 times)

0 Members and 1 Guest are viewing this topic.

API Function Codes Help
« on: January 28, 2018, 01:28:25 AM »
I looked through all of Mach 4 Core API for the function codes, but can't seem to find them.

I want to add some physical buttons to my pendant and need the codes so I can add them to the lua script.

1. Ref All Axis.
2. Zero Fixture Z

Any help would be appreciated.
Re: API Function Codes Help
« Reply #1 on: January 28, 2018, 02:36:33 AM »
Hi,
I would think that a function like that will be built up of several API calls and some logic to glue it all together.

This should get you looking in the right place:
Quote
LUA Syntax:
rc = mc.mcAxisHomeAll(
   number mInst)


Quote
LUA Syntax:
rc = mc.mcAxisSetPos(
   number mInst,
   number axisId,
   number val);


In the Axes category.

Craig
My wife left with my best friend...
     and I miss him!
Re: API Function Codes Help
« Reply #2 on: January 28, 2018, 11:14:46 AM »
Great Thanks!!

Offline Chaoticone

*
  • *
  •  5,628 5,628
  • Precision Chaos
    • View Profile
Re: API Function Codes Help
« Reply #3 on: January 28, 2018, 11:48:34 AM »
Map your inputs to signals.

Watch for those signals state changes in screen load siglib.

Based on sig state call functions in the screen load script to do what you want.
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!