Hello Guest it is April 28, 2024, 06:16:11 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 - mcardoso

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 »
191
Got the serial code loaded and running! I currently have it reading the drive bus voltage 10 times a second through the PLC script with a 1ms fixed delay. ESS buffer holds steady at ~160 and CPU utilization jumps between 20-30%. So far I haven't seen any issues but I also haven't run the machine using a Gcode file.

First thing to implement will be a bar graph on screen showing spindle load.

192
Huh, thats a little concerning  :o

I will mess around with it and report what I find. Thanks again for the thoughts!

193
Craig,

Thanks for the thoughts. PLC script rate is under Edit Screen -> profile name at the top of the tree. I have mine set at the default 50ms so roughly 2% of PC time is blocking. I really have nothing important in there so it could easily be set slower if needed.

I was under the impression that the LUA and mach core are completely separated. If I write horrible LUA code like sleep(1 minute), the GUI would freeze for a minute, but the machine motion would continue along perfectly fine. Is this incorrect?

Thanks!

194
I have been developing a serial communications script for continuous data retrieval from a servo drive. I need to delay a very short time between transmitting and receiving to allow the drive to send a response. I initially attempted to use coroutines and a wxTimer (which works fine) but ended up deciding that the complexity of returning data from an asynchronous function was going to be more of a pain that it was worth.

I tested the function just simply using wxMilliSleep() and found it to work perfectly. I am only using a 1ms delay and never miss a transmission.

My question, how bad of a practice is it to have a blocking delay in the PLC script? How much delay is acceptable before the function of Mach 4 is negatively affected?

195
Mach4 General Discussion / Re: 1 Gcode => many parts
« on: April 05, 2019, 08:42:07 AM »
I just looked it up and it looks like HSM has a nesting utility. That would be the best way to pack the parts on a sheet, especially if they aren't square since the program will optimize the layout to get the most parts per sheet.

196
Perfect! You guys are awesome. Thanks

197
I think for my purposes, it is ok to run the drawbar if the spindle motor is enabled so long as it is not moving. Does the spindle ON reflect motor enable or non-zero speed?

198
Mach4 General Discussion / What API Call to use for spindle running?
« on: April 04, 2019, 01:58:36 PM »
Hi All,

I want to interlock the pushbutton for my pneumatic drawbar to not operate when the spindle is rotating.

My first thought was to use the measured RPM of the spindle index pulse and check if it is equal to zero using mc.mcSpindleGetTrueRPM(), however this is not reliable under 200 rpm since the value drops to zero shortly after the index has passed. Also whenever the drawbar extends or releases, a huge garbage number is momentarily thrown into this value (not sure if something to do with relay contact noise or software).

I then wanted to get the commanded motor speed and check if equal to zero. mc.mcSpindleGetCommandRPM() doesn't work because the value is set by the last "S" code and is non-zero when an M05 is issued. I then wanted to use mc.mcMotorGetVel() but I got syntax errors using the code

Code: [Select]
velocity, rc = mc.mcMotorGetVel(inst, 6)
Note: My Spindle is OB1 (motor 6 I'm pretty sure)

Any thoughts on the best way to detect if the commanded or actual spindle velocity is non-zero? Or why the above syntax was wrong?

199
Hi All,

I have a servo controlled spindle on my machine and have wandered across a check box to enable step/dir spindle rigid tapping. Is this documented anywhere? What cycles are supports and how does mach respond when that box is checked vs. not checked?

200
Mach4 General Discussion / Re: Using the Serial plugin from a macro
« on: April 03, 2019, 08:58:58 AM »
I've gotten ASCII serial working well for communications over RS485 to some servo drives. The scripting in LUA is relatively easy. If you have specific questions about how to get Mach to read/write serial I would be happy to help.

Also remember that only one program can "own" a serial port on a computer, so if you have a terminal emulator running, Mach won't be able to talk on the port.

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 »