Hello Guest it is April 25, 2024, 01:10:04 PM

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.


Messages - matrix

Pages: 1 2 »
1
Mach4 General Discussion / io.open path wit special char
« on: November 16, 2019, 06:58:01 AM »


Hello,

I need change some line from a Gcode every time I load on mach4, so I made a script that
open this file, replace the lines I want and load to mach4 without problem.


So, the problem is, if the Gcode Path (on windons) have some special char like "c:Users\Alçada\test.nc" , the "ç" char dont work
on "file,err = io.open( "c:Users\Alçada\test.nc")"

Any way to solve this?

Thanks





2
Mach4 General Discussion / Re: If is running lua code
« on: November 02, 2018, 04:33:50 AM »


Thank you,

This script work if is running, but is  is Pause this return false, I need if is runnin and if is pause.

By the away, the led on the screen (return true) is a bug right?

Thnaks

3
Mach4 General Discussion / If is running lua code
« on: October 31, 2018, 02:48:52 PM »

Hello,

I need a lua code for check if the gcode is running or not.

I try set one led on screen with (File Running, File Feed Hold), and this work on led, while start ou pause run the led is on, if stop the led turm off.


I create a lua script that ckeck is this led is on or off:

State = scr.GetProperty("RunningLed","Value")
if State == 1 then
   print ("led on")
   else
   print ("led Off")
   end


for some reason (I think that is a bug)  return always ON.

The same script for other diferente led, work OK


Any tip??






4
Mach4 General Discussion / Run Script on startup
« on: October 26, 2018, 12:07:04 PM »


Hello, me again.

I'm in the process of upgrading from mach3 to mach4, and as I have many scripts in VB, I need to redo everything for Lua.

At this point I am still understanding the Lua syntax, and define how I am going to do this upgrade with the least possible effort.


So,
I created a script just for outgoing tests / inputs, messaging etc, and I recorded it with the name outputCheck.mcs on the macro folder, so far so good.

the strange thing is, every time I start mach4 this script runs once, if you turn off the mach 4 and start again the script run agains one time.

What's the secret, who knows?




5
Mach4 General Discussion / Re: Lua append txt file
« on: October 26, 2018, 11:56:34 AM »


Solve,

The folder as to be maximum share permition.

it's a little weird because if the file does not exist the script creates a new one, but for some reason if it already exists, it's not possible to append.

Any way, solve.

6
Mach4 General Discussion / Lua append txt file
« on: October 25, 2018, 01:16:56 PM »
   
   
Hello,

I try append on txt file, and there is a problem, if the file dont exist, this script create a file and write the message.

but if the file already exist, the File return a nil values, and dont append the message

File = io.open("C:/perfLogs/Log1.txt", "a+" )
File:write("test...")
File:close()


Is this code supposed to work for append mode? Why does not it work?

Any one?


7
Mach4 General Discussion / If output/input is off or onn
« on: October 22, 2018, 01:23:26 PM »
Hello,

I'm trying to do something simple like, check if an output or input is active.

I'm use mach3 VB, and I'm not able to find the dynamics of the LUA.


This command dont work, why not?

local inst= mc.mcGetInstance()
local Output0 = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT0)
if (sig == Output0) then
   wx.wxMessageBox("Output on")
end


what is the trick??

8
VB and the development of wizards / Re: do user button
« on: June 13, 2017, 08:52:25 AM »


thanks for the answer,


I also tested with the dobutton(1500) and it does not work, Is a button with a VB script, it is set to like function "User defined:1500", so, this is a user button right??

I know there is some silliness between DoButton and DoOemButton.

I do not know if I can call this button directly from a VB script like macropump ou M.m1s macros??


9
VB and the development of wizards / do user button
« on: June 13, 2017, 07:12:18 AM »


I set on screen a button with a vb script, this is a user button, I need call this button from macropump,I already tried calling as  ex: "douserbutton(1500) but dont work, Does anyone know how I can do this?


tanks

10
VB and the development of wizards / Re: SetParam("AccelerationX",)
« on: December 05, 2015, 03:31:31 AM »

Thank you for your Replay,

My machine when working at low speed, and to do a small job, like a wheel rack, the axes are very raw and jerk, This does not happen if you are doing a job a little bigger.

If I increase de acc time, this much better and and the axis flows smoothly,  but this compromises the work at higher speeds, All axis are very slow because of acc.


So, the idea is increase the acc at low speed, and decrease high speed, like a dinamic adjustment.


Pages: 1 2 »