Hello Guest it is April 28, 2024, 11:22:34 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 »
11
Mach4 General Discussion / Re: TOOL CHANGE ISSUE
« on: May 05, 2020, 02:07:19 PM »
Can you post your tool change code? Maybe an example of Gcode with descriptions of what does or doesn't happen at each line.

12
Mach4 General Discussion / Motion Planner Look Ahead for Nerds
« on: May 05, 2020, 09:26:17 AM »
Hi All,

I do industrial controls and realtime motion control at work. This differs drastically from the pre-planned and highly optimized motion planning that is used in the CNC world. I was wondering if anyone had any good "brain-leaking-out-of-the-ear" kind of reading on how CNC path planning and look ahead are accomplished. I'm particularly interested in understanding how/why increased lookahead changes the performance of CV motion control and how motion commands are buffered in PVT data for motion controllers.

Mach 3 had some great technical reading on how the motion planner actually functioned, especially when pulses were generated out the parallel port. I could have read that content for weeks! I don't need to limit myself to Mach 3/4 either if someone knows a good read.

Thanks!

Mike

13
@thosj

I do the exact same thing. Probably unnecessary but it gives me peace of mind!

14
Wow! Glad you're familiar with this! So does the scan denominator slow down the rate of update? Like only update every 4 scans if the denominator is "4"?

Any idea how to add the modbus signals to LUA? Like lets say I wanted to read the value on one register and write it to another...

15
So I'm getting a pretty good feel for this! I do notice that Mach is likely to crash or respond slowly when I setup very high counts of read registers (0x4, qty 1000). Another thing I notice is that each Modbus function takes about 40ms to execute pretty much regardless of the quantity of registers being read. This discourages the user from setting up lots of individual Read Coil (0x1) functions in favor of 1 function with a large quantity of coils.

Where would I find the LUA API calls for the Modbus? I don't see them in the Mach4API.chm file.




16
Holy crap! I poked at the Modbus configuration and code in the PLC. Had everything working in 15 minutes! It is so much more simple than setting up Modbus in Mach 3.

So far the only thing that isn't working is if I power on my slave (PLC) after Mach 4 is opened up, the Modbus won't connect automatically. I have to go into the Diagnostic -> Modbus then click STOP and START. After that, everything is working. Any idea how to get it to connect automatically?


17
Oh perfect. I was actually just researching this. I knew there were Modbus expansion cards, but direct socket messaging to a Modbus TCP master would be much cleaner. I need to play around with this!

I'm assuming that if my goal is to consume digital and analog values into Mach 4 and perhaps use digital bits to sequence logic in the PLC, Mach 4 would be the master and the PLC would be the slave.

18
Yup that would definitely work I would think. My PC that runs Mach 4 has 2 Ethernet ports, so one for ESS and one could be for Modbus TCP.

Was just curious if it was a fools errand to try to communicate through Ethernet unsolicited socket messaging or any other method over pure Ethernet (not Modbus)?

19
Hi All,

I'm not actively trying to make this work this second, but I'm interested in learning about trying to interface Mach 4 to an industrial PLC. I had a lot of success implementing a serial communication function within LUA so that got me thinking about other methods.

I have an Allen Bradley ControlLogix PLC. It can talk on almost any industrial communication protocol, but the most common is Ethernet/IP. The quick and dirty way to get this to work would to be to add a Modbus TCP module to the PLC and connect that to the PC, however is Mach 4 capable of Ethernet messaging? Is this functionality built into LUA natively?

I'm thinking mostly about just generic I/O consumption from the inputs on the PLC, but perhaps more involved schemes could be created that would allow Mach 4 to instruct the PLC to do things (not coordinated to the motion planner). Ethernet is wicked fast so I think this would be pretty successful.

20
Mach4 General Discussion / Re: T## Oddities
« on: April 29, 2020, 08:23:00 AM »
SwiftyJ, I was able to replace the file with an older one that I had from Feb 2020 and that seems to have done the trick! Thank you very much!

I'm still interested in learning more about what the INI file does for Mach. I'm guessing it holds the settings from the menu?

I'm also very interested why it got messed up after the backup restore. Unlike a windows backup, the one I did was a bit for bit image completed at the BIOS level. It should be an exact replica of the computer when the backup was made.

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 »