Hello Guest it is April 29, 2024, 02:52:59 AM

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 »
111
Mach4 General Discussion / Re: What can cause a Corrupter Mach 4 profile?
« on: November 13, 2019, 02:50:39 PM »
Steve!

Wow! A million miles ahead of me  ;D Always saw this option but never knew how to use it. Thank you for sharing.

Mike

112
Mach4 General Discussion / Re: What can cause a Corrupted Mach 4 profile?
« on: November 13, 2019, 11:48:23 AM »
Thanks Smurph!

That's exactly what happened!

Curious though... Why? This is coming from a non-computer programmer so I might be totally naive. If I kill my computer without closing MS Word, or my CAD programs, or my CAM programs, they don't seem to go corrupt. Would it be possible to save a "last good state" automatically in Mach so if my computer gets shut off by a power outtage then all I would lose would be settings changed in the last session. I know making backups is a necessary part of using Mach 4 (and I am diligent about making them), but couldn't it auto-recover for most cases?

Just curious  ;)

Also can I edit my glorious typo in the title of the post? Whoops!

113
Making progress! Turns out the Error "09" (Timeout) will occur whenever there is not data available to be read from the buffer. This is a normal condition for me (e.g. read until the buffer is empty) so I need to adjust my error checking to not abort my script if a timeout error is generated.

114
Mach4 General Discussion / Re: What can cause a Corrupter Mach 4 profile?
« on: November 12, 2019, 03:05:45 PM »
When I had a corrupted profile, my screen set loaded to the WX4 (super old) screenset and wiped out all of my ESS settings. I was able to reselect my screenset, but my settings were lost. Had to revert to a backup.

115
Wow, quite burried in there. Will experiment with the timeout value tonight.

Also it seems like there is a p:flush() command which I might try instead of reading the max buffer length to empty the port.

116
jbuehn,

Thanks so much for taking the time to respond. I am not well versed in GitHub. Could you point me to where you found that information? I've been clicking through the files but have not found it yet.

-Mike

117
I have been successfully using Mach 4 and my computer's embedded serial port for some months now (using the LUARS232 module included with Mach 4). I definitely had some trouble understanding it at the beginning, but now it is a framework for serial communications with my servo drives and works great.

At the recommendation of several members and admins on this forum, I have implemented rigorous error checking and handling throughout all of my scripting. Unfortunately this has been giving me new headaches by... catching errors  ;D

I have been able to correct my code to fix all but a handful of errors, mostly thrown by calls to the serial API. Those calls do return error codes to help troubleshoot, however I have been completely unable to find documentation on the RS232 module, either within the Mach 4 documentation or on the greater internet.

For example, I have the line of code:
Code: [Select]
local err, data_read, size = p:read(4096, 100)
where 4096 is the length of buffer to be read and 100 is the timeout in ms.

This returns the error code "09", but I cannot find ANYTHING to tell me what "09" indicates or how to correct it. I am at a loss.

Any suggestions where to look would be greatly appreciated.

Thanks! - Mike

118
Mach4 General Discussion / Re: Galil vs Vital
« on: November 07, 2019, 08:33:50 PM »
That is correct. It is a feature that very few use (outside of professional machine tools) but is very powerful.

This usually closes the velocity loop using the motor encoder and the position loop using the glass scales. This way you get high dynamic response with tight position control.

119
Mach4 General Discussion / Re: Galil vs Vital
« on: November 07, 2019, 10:56:24 AM »
Or install an encoder on the motor shaft if it doesn't already have one. AMCI and US Digital offer low cost low profile encoder options. The glass scales wouldn't be used in this case.

120
Mach4 General Discussion / Re: Help me troubleshoot the Cycle Timer
« on: November 06, 2019, 11:31:23 AM »
Was able to get the CycleTimer working! Turns out I didn't delete any code, however the value of "machEnabled" is stuck at zero for some reason.

I ended up removing the condition on machEnabled == 1 for the cycle timer to display since I'm not sure why is was ever required.

I need to troubleshoot getting the machEnabled state working correctly again before I put the condition back in. Thanks for all the help and understanding on how this works!

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 »