Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
Search
Re: Next Development Version and Legacy Issues. + Pendent Issues
Peter Homann
Art,
toggle quoted message
Show quoted text
All the changes sounds excellent to me. I have a question regarding the exporting the state of the system. Let me explain. I have one of the Pendents sold by Richard Piatek. These are very nice and professional commercial unit. There is a one to one mapping for a lot of the buttons on the pendent to the mach2 functionality. You must be doing things right). all of these buttons have a LED indicator. The pendent also has a 16x2 LCD character display, a 100 step/rev MPG and an ESTOP button. Pictures of it are in the files area. The pendent is controlled by a large FPGA and a H8 Micro controller and communicates back to the original controller via RS-232. These are all on a separate PCB. My plan is to replace the PCB with one of my own. It seems a shame to just connect the switches to a keyboard encoder as some plan to do. We could do something really special. The reason for replacing the board is that I believe that it will be too difficult to reverse engineer the existing controller board. Although the pendent is packaged beautifully, there is nothing stopping use from putting all the same functionality into an "off the shelf" enclosure. After all it just contains a lot of switches, LEDs, a 2x16 character lcd display, estop switch, and a controller board. One of the issues with just using a keyboard encoder is that the LEDs can show state. For example, there are 3 buttons labelled X1,X10,X100. These are the jog increments for the MPG. If X10 is pressed, then I assume that the LED for that button will stay illuminated to indicate the current jog increment. Also I'd expect the spindle Forward button's LED to flash when the spindle is ON. Initially I considered keeping the state of the system in the pendant's micro controller. One of the first rules of software engineering is "If you store the state of a variable in two places, one of then will be wrong" So, what am I after? A method of interacting/controlling Mach2 via a serial Port. I don't know enough about the macro facility of Mach2 to know if a lot is already there. Does each function in Mach2 have an OEM code? Does a keyboard shortcut invoke an OEM code? Is each function invoked by an OEM code written as a macro and able to be changed? Can all of the variables that hold state, Spindle speed, MPG jog increment, MPG selected axis, etc be read and written to via macros? On possible method for what I want to do may be to invoke the OEM functions via the serial port. That would mean that Mach2 would have to monitor the port and process a command set. This command set could be very similar to the existing OEM codes? Also, it would be necessary to output the value of any states changes invoked out through the serial port. For example, the spindle on/off control.- The user pushes the Spindle Forward button on the pendent. This sends an message (110 "M3") via the serial port to Mach2. The function that this calls sends a message containing the state of the Spindle LED out of the serial port. The pendent micro controller would process this message and update the associated LED on the pendent. Also pressing the spindle button on the screen or pressing the shortcut would also send out the Spindle LED state, as this is coded in the function. The use of the serial port for pendent control would be configurable. Another example. The MPG encoder.- On the pendent the user would select, via the rotary switch the axis, say the Y axis. This would send a message to Mach2 which would update the screen and send back the selected axis. The user then selects the X10 button. This sends a message to mach2 which sets the jog increment. Mach 2 responds with a message containing this variable. The pendent illuminates the LED. As the user rotates the MPG a stream of messages indicating +/- movement is sent to Mach2. How much of what I'm asking is already there? I know that reading the serial port is not. How far away is that. Another possibility may be. Is there a range of "User OEM Codes"? With these I could write macro functions that do what I defined above. With this I could implement a PS2 keyboard encoder still sending the state out of the serial port, but would still want the normal keyboard as well. Am I asking too much? I'm not sure. I'm guessing that eventually Mach2 will be able to be used with a sophisticated pendent at some time. I am happy to work on a pendent controller that will look after the pendent pushbuttons, LEDs, LCD, rotary switches and MPG. A defined interface method between Mach2 and the pendent controller would need to be identified. Once the controller is complete, people could package it as necessary for their application. Sorry it's so long Thanks, Peter Homann mailto:Peter.Homann@... Adacel Technologies Limited, 250 Bay St, BRIGHTON, 3186, AUSTRALIA <> Telephone +61 (3) 8530 7777, Facsimile +61 (3) 9596 2960 Mobile 0421-601 665 -----Original Message----- |
to navigate to use esc to dismiss