Hello Guest it is April 28, 2024, 06:56:39 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 »
171
I'm pretty sure the DMM DYN4 has a software setting for max acceleration which should do the same thing.

172
My AC servo drive (Allen Bradley Ultra 3000i 2kW) has a software rate limiter called Slew Limit. I set it at 1.5x the max accel in Mach 4. Ideally this limit never goes into effect, but during accel, decel, and significant changes in speed I can hear and see the spindle jump in speed (down to near zero) and kick back up. That's what the above graphs show. I've never seen this issue while the spindle is running at constant speed, but if you are doing CSS, then it could apply.

I would add a locking screw to your chuck regardless. I know it is a small lathe, but it could still do some damage.

173
I've successfully written scripts to communicate over RS232 using ASCII protocol (not Modbus). There is essentially no documentation on it, but the coding isn't too hard.

Start with the following code placed near the top of your Screen Load script:

--Place this code at the top of the screen load script
--Open the COM port immediately upon loading Mach 4. Com port remains open until Mach 4 closes

Code: [Select]
rs232 = require("luars232")
port_name = "COM1"
local out = io.stderr

---------------------------------------------------------------
-- Initialize Communications --
---------------------------------------------------------------

--Open Serial Port 8N1 38400 baud
local e, p = rs232.open(port_name)
if e ~= rs232.RS232_ERR_NOERROR then
mc.mcCntlSetLastError(inst, "Cannot Open Serial Port")
return
end

-- set port settings
assert(p:set_baud_rate(rs232.RS232_BAUD_38400) == rs232.RS232_ERR_NOERROR)
assert(p:set_data_bits(rs232.RS232_DATA_8) == rs232.RS232_ERR_NOERROR)
assert(p:set_parity(rs232.RS232_PARITY_NONE) == rs232.RS232_ERR_NOERROR)
assert(p:set_stop_bits(rs232.RS232_STOP_1) == rs232.RS232_ERR_NOERROR)
assert(p:set_flow_control(rs232.RS232_FLOW_OFF)  == rs232.RS232_ERR_NOERROR)

This opens a serial port on your computer and allows you to read and write.

The serial write function takes a string and transmits it over the serial port opened above. It returns an error if applicable, and the length of the string written on the port.

Code: [Select]
err, len_written = p:write(string, timeout)
The Serial Read function pulls the characters from Windows' serial buffer (default 4096 bytes/characters) which keeps track of the incoming data behind the scenes. Once you read a character from the buffer, it is gone forever so reading empties the buffer. It returns an error if applicable, the data (as a string), and the length/size of the string.

Code: [Select]
err, data_read, size = p:read(read_length, timeout)

This is a very high level overview. I'd be happy explain more if this is what you are looking for.


I should add that no special packages, libraries, dll's, or anything else need to be added for this to work. Just a clean install of a recent version of Mach 4.

174
Attached images are captured directly from the internal data of the servo drive. Note that there is a max acceleration limit imposed in order to prevent drive faults.

Graphs show commanded velocity (as a result of Step/Dir input) over time as the spindle accelerates and decelerates. Note the velocity is inverted (ramps from 0 to -5000 rpm) but this doesn't affect the function of the motor, only the direction of rotation.

175
Had similar issue with my Mach 4 servo spindle using an ESS. The guys at Warp 9 stated that there was something going on with Mach 4 and step direction spindles where the commanded velocity goes to zero for a single time slice. I have graphs to show this issue if you would find them helpful.

Warp 9 TD, the makers of the Ethernet Smoothstepper have decided to take over the spindle control internally to the motion controller to correct this issue, but that has not yet been implemented. I would personally like to see NFS correct their end of things (if this is a verified issue) since it seems the issue is not unique to the ESS.

176
Mach4 General Discussion / Re: Mach 4 Mill CSS
« on: April 30, 2019, 11:21:28 AM »
Awesome! Thank you. I am using the X axis same as the lathe (just in radius mode). I will play around with this.

177
Mach4 General Discussion / Mach 4 Mill CSS
« on: April 30, 2019, 10:31:22 AM »
Does Mach 4 Mill support constant surface speed? If so how do you set it up?

I am running my mill as a lathe for small diameter work using work offsets for tool positions. This works great but it would be nice if I could use CSS and feed per rev like a normal lathe.

178
Converted all my custom functions to modules. Took a little effort but well worth it. Functionality has not changed (that's what I wanted)

179
Upgraded from 3884 to 4162 and the options to tie the bar gauge to a register is now there! Problem solved. Thanks

180
Very interesting....

When I open the properties for either a bar gauge or the crescent gauge, I only see the option "code". If I could get to what you are seeing then this would be perfect!

I do have the value in my regfile -> global register. Should this be in the instance section? I'm not sure I understand the difference. Either way, I have been able to read and write to the register.

Which version of Mach 4 are you using? I am at the last fully supported 3884, but I see now that the recommended download has been updated to 4162 so I will change to that.

I figured that would be the case about the wxGauge and would like to avoid LUA panels for the time being.

Thanks for your thoughts and time!


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 »