Hello Guest it is March 29, 2024, 02:07:26 AM

Author Topic: API Function Codes Help  (Read 1116 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
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: API Function Codes Help
« Reply #2 on: January 28, 2018, 11:14:46 AM »
Great Thanks!!

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • 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!