Retrofit - Micron WF 40 C

More
17 Aug 2021 05:58 #217955 by Vojta333
Greetings gentlemen,
I bought a Swiss Micron WF 40 C from the German auction portal Surplex for a good price. I didn't have much information about the machine, I only found the Micron WF 41 C on the internet, so I shopped almost blindly. However, the purchase was successful, the machine is in very good condition, the ball screws and guide surfaces are almost intact, given that the machine is 40 years old (1981 according to the spindle motor), the spindle itself is not even audible during operation. I have to praise the Swiss quality of workmanship, compared to our Czech machines of the TOS FNG 32 type.

The machine has a Heidenhain TNC 145 control which I will be redesigning to LinuxCNC, I have already ordered Mesa cards, a purchased computer and now I am building a console in which I will place everything. I found a Slovak man who represents the Micron WF 3 which is 95% identical to my milling machine, including the electrical diagram which he kindly sent me.

The milling machine has a card in it which processes commands from the control unit, it is mainly the logic of shifting, just like other milling machines from this production date it has an automatic mechanical transmission. The control system sends an 8-bit command to the S and M functions

The machine is currently in a state where it is disconnected from the sheets that I will clean in the near future, change the hoses to emulsion and then reassemble everything.

Milling machine parameters
Travels: 600x600x500
Travel speed: 2 m / min (4 m / min fast)
Spindle speed: 31.5-3150
Spindle power: 4-5 KW (two-speed motor)
Weight: 2.8 t
Attachments:

Please Log in or Create an account to join the conversation.

More
17 Aug 2021 08:13 #217965 by Vojta333
Replied by Vojta333 on topic Retrofit - Micron WF 40 C
Now I have a few questions, I will need to remap all S and M commands to a script that will send a parallel 8-bit command to card in the machine. Could someone direct me how to do this?

As inspiration I have a code from "Rotarysmp"
github.com/jin-eld/mh400e-linuxcnc/tree/...cc50e62a9b31d9129772

If I understand correctly, I will create a .hal file (in his case mh400e_gearbox.hal) in this file I will load the component "loadrt mh400e_gearbox" and assign inputs / outputs.
I will write a code into the component which will assign an 8-bit output to the input request, including verification of all security conditions. It is possible to use .c files (mh400e_gears.c) for this as helping script

Now I just don't know how to run this created component while the program is running, is it easy or is it necessary to write a python script that monitors whether the line did not have code containing S?
I found this

forum.linuxcnc.org/gmoccapy/42762-proble...ap-s-python-setspeed
def setspeed (self, ** words): try: c = self.blocks [self.remap_level] if not c.s_flag: self.set_errormsg ("S requires a value") return INTERP_ERROR self.params ["speed"] = c.s_number emccanon.enqueue_SET_SPINDLE_SPEED (0, c.s_number) return INTERP_OK except Exception, e: self.set_errormsg ("Setspeed:% s"% (e)) return INTERP_ERROR


Is this the right procedure? The program will stop and wait for this script (component) to be executed?

Please Log in or Create an account to join the conversation.

More
17 Aug 2021 08:26 #217966 by Vojta333
Replied by Vojta333 on topic Retrofit - Micron WF 40 C
It would help me the most to write a program which, if the S command appears, would pause the program, start the component and light up the light, the program would wait until the button was pressed, then the program would continue to run.

I should then be able to adjust this structure for my gear shifting needs

Please Log in or Create an account to join the conversation.

More
17 Aug 2021 08:55 #217968 by Vojta333
Replied by Vojta333 on topic Retrofit - Micron WF 40 C
I apologize for spamming, I just have to write here before I forget, getting acquainted with LinuxCNC programming is a very difficult task, as I did not find any "user friendly" instructions, most of the instructions are just about installing LinuxCNC or in .hal added buttons and lights.

Anyway, if I understood the code from rotarysmp correctly, when running LinuxCNC, the component is loaded into its own thread via .hal

loadrt threads name1 = mh400e-sim-thread period1 = 1000000

And then the function starts inside the component

FUNCTION (_)
{
.
.
}

every period1 = 1000000, so that in each loop the required speed from the control system is compared with the set speed stored in the component memory?

If it is to be included, it is set to the control system that "spindle.0.at-speed = false" until shifting takes place, the machine is stopped during this, then "spindle.0.at-speed = true" is set and the program continues.

Is my reasoning correct?

I guess this approach is better in that it does not only capture S commands but also the set speed, for example with a potentiometer or a slider on the screen.

Please Log in or Create an account to join the conversation.

More
17 Aug 2021 21:22 #218019 by andypugh
Replied by andypugh on topic Retrofit - Micron WF 40 C
Yes, I think that you have it correct.

It would also be possible re-map the S command and call a routine that sets the gear positions. That routine would need to be written in either G-code or Python.
A Python routine could output "halcmd" commands to set individual inputs in HAL.

The fact is that there are many ways to do this.

Another option is Classic Ladder.

If you are familiar with C then the custom HAL component is probably the way to go.

Please Log in or Create an account to join the conversation.

Moderators: cncbasher
Time to create page: 0.095 seconds
Powered by Kunena Forum