Hello Guest it is April 23, 2024, 03:29:01 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.


Topics - Aral

Pages: 1
1
CS-Lab / Csmio-s with Opt laser
« on: October 23, 2019, 05:28:09 AM »
Hi

I connected the 5v TTL input of the opt laser on the analog 0 output in the controller, and the other TTL input of the laser to digital output 2 of the controller. I can switch the digital pin 2 with the M62/63 commands. But then the laser is switch on on full power. So for cutting it is fine.

Now I am battling to get the PWM working for engraving. I can not get the spindle analog value to work. I went through all the manuals and settings and I think I'm missing something. So now I want to try something different. The idea is to make my own custom mcodes to set the  analog 0 value directly on and off in the macro's, and the I can write my own post processors for the values. But now I am over my head with lua.

I emailed the support at Cslabs but either they do not understand English or do not want to help.

Can somebody maybe help me with the code to set the analog 0 value in the register.



Thanks

Johan

2
Modbus / Arduino and Modbus Help
« on: August 19, 2019, 05:46:20 AM »
Hi

I am totally new to Mach4 and I am struggling with Lua. I connected a Arduino Uno through the Modbus to Mach4. The communication between the Arduino and Mach is ok. On the A0 analog pin is a LM35 Temp sensor. I want to show the temp reading in a text box. In the PLC script I Put the following lines:

-- Temp LM35
inst = mc.mcGetInstance()
hreg = mc.mcRegGetHandle (inst,"Arduino/LM35")
local TempVar = mc.mcRegGetValueString(hreg)
local TempValue = tonumber(TempVar)*500/1023

How do I get the Tempvalue in the textbox register?

Sorry if it is a dumb question.

Thanks

Johan

Pages: 1