Hello Guest it is April 25, 2024, 05:42:28 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - michael123

Pages: 1
1
Mach4 General Discussion / lua script - outputs, if
« on: July 23, 2018, 06:07:17 AM »
Hi, my program, on button


Quote
local inst = mc.mcGetInstance()
local Output16 = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT16)
local Output5 = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT5)
local Output12 = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT12)

mc.mcSignalSetState(Output16, 1)  --On
mc.mcSignalSetState(Output5, 0)  --Off
mc.mcSignalSetState(Output12, 0)  --Off

 i want to add "if" output 24 csmio ip have 1 then, but i write it (down) and doesnt work, sb could help me?

Quote
if (mc.OSIG_OUTPUT24()==1)then

local inst = mc.mcGetInstance()
local Output16 = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT16)
local Output5 = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT5)
local Output12 = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT12)

mc.mcSignalSetState(Output16, 1)  --On
mc.mcSignalSetState(Output5, 0)  --Off
mc.mcSignalSetState(Output12, 0)  --Off
end



2
Mach4 General Discussion / variable
« on: July 18, 2018, 04:16:44 AM »
I create new variable
i have register "csmio-ip/analog input 0" and new "new variable"

and i want to do sth mathematic operation, have I write lua sript?

sb can help me?

3
Mach4 General Discussion / lua code help please
« on: July 16, 2018, 07:16:05 AM »
inverter (multi-function)
four outputs

MI3/MI4/MI5/MI6

1st button  -- on/off/off/off
2nd button -- off/on/off/off
3th button  -- off/off/on/off
4th button  -- off/off/off/on

one of them

local inst = mc.mcGetInstance()
local Output5 = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT5)
local Output6 = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT6)
local Output7 = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT7)
local Output8 = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT8)

mc.mcSignalSetState(Output5, 1)  --On
mc.mcSignalSetState(Output6, 0)  --Off
mc.mcSignalSetState(Output7, 0)  --Off
mc.mcSignalSetState(Output8, 0)  --Off


and doesnt work,


mach4
on 3.0.12 it worked
on 3.0.16 not


4
G-Code, CAD, and CAM discussions / please help
« on: April 24, 2018, 03:18:38 AM »
Quote
unknown G code used


G0 G90 G54 G17 G40 G49 G80
T1 M6
S2500 M3
G0 X3.0 Y0.0
G43 H1 Z.5
G94
G1 Z0.0 F10.0
G3 X1.0 Y2.0 I-2.0 J0.0 F10.0
G0 Z.5
G0 G53 Z0.0
M30




where i have problem?

5
Mach4 General Discussion / lua code help please
« on: April 16, 2018, 07:11:59 AM »
mach 4
in attachments i send a picture, i have 4 buttons, i need script:

if I click one of this four = this one on, the others = off
if i click second of this four = this one on = the others =off
and for 3th and 4th the same

please help me I dont have mind, and this is my work

Pages: 1