VMC related HAL questions.

More
10 years 10 months ago #67380 by andypugh
Replied by andypugh on topic VMC related HAL questions.
try sudo comp --install …

The command name was changed

Please Log in to join the conversation.

More
10 years 10 months ago #67391 by thewho
Replied by thewho on topic VMC related HAL questions.
Worked lika a charm :)

Let's see if I got this right..
Warning: Spoiler!


Some thing that I realized when writing that:
I have an hydraulic pump that activates the drawbar and then A valve that releases the pressure and locking the tool in the spindle.
And as far I can tell that is not the way this hal-file is set up?
So for my machine it would be:

*Oriented and arm extended
1. Activate Pump
2. Wait for "tool released" sensor
3. Turn off Pump
4. Move Z
5. Unlock Carousel
6. Move Carousel
7. Lock Carousel
8. Move Z
9. Activate Pressure release valve
10. Retract Arm

Please Log in to join the conversation.

More
10 years 10 months ago #67396 by andypugh
Replied by andypugh on topic VMC related HAL questions.

thewho wrote: Let's see if I got this right..

Warning: Spoiler!


In your case you need "encoding=bcd"

Some thing that I realized when writing that:
I have an hydraulic pump that activates the drawbar and then A valve that releases the pressure and locking the tool in the spindle.
And as far I can tell that is not the way this hal-file is set up?


In the demo that sequence is handled in the G-code toolchange routine. You need to make that suit your system, though it is already pretty close. You may need an extra output and an extra phase.

Please Log in to join the conversation.

More
10 years 10 months ago #67397 by thewho
Replied by thewho on topic VMC related HAL questions.
I see :silly:

Could you please explain a few things in the .ngc?
Warning: Spoiler!



EDIT: I'm stupid.. It's the "motion.digital-out-XX" that specifies that right?

Please Log in to join the conversation.

More
10 years 10 months ago #67399 by thewho
Replied by thewho on topic VMC related HAL questions.
This is as far as I got in the HAL-file, just a few questions.. :whistle:
Code:
loadrt carousel pockets=15 dir=1 encoding=bcd num_sense=5 loadrt conv_float_s32 addf carousel.0 servo-thread addf conv-float-s32.2 servo-thread # G-code analogue outputs are float-type net car-enable motion.digital-out-00 carousel.0.enable net car-ready carousel.0.ready motion.digital-in-00 net hm2_5i25.0.7i77.0.0.input-16-not carousel.0.motor-fwd #ActivateCarouselMotorOutput #net car-rev carousel.0.motor-rev net car-pos-req motion.analog-out-00 conv-float-s32.2.in net car-pos-s32 conv-float-s32.2.out carousel.0.pocket-number net hm2_5i25.0.7i77.0.0.input-16-not carousel.0.sense-0 net hm2_5i25.0.7i77.0.0.input-17-not carousel.0.sense-1 net hm2_5i25.0.7i77.0.0.input-18-not carousel.0.sense-2 net hm2_5i25.0.7i77.0.0.input-19-not carousel.0.sense-3 net hm2_5i25.0.7i77.0.0.input-20-not carousel.0.sense-4 net hm2_5i25.0.7i77.0.0.output-08 motion.digital-out-01 #LockCarouselOutput net hm2_5i25.0.7i77.0.0.input-21 motion.digital-in-01 #CarousellockedInput net hm2_5i25.0.7i77.0.0.output-09 motion.digital-out-02 #ActivateArmOutput net hm2_5i25.0.7i77.0.0.input-22 motion.digital-in-02 #ArmExtendedInput net hm2_5i25.0.7i77.0.0.input-23 motion.digital-in-04 #ArmRetractedInput net hm2_5i25.0.7i77.0.0.output-10 motion.digital-out-03 #ActivatePumpOutput net hm2_5i25.0.7i77.0.0.output-11 motion.digital-out-04 #ActivateDrawbarReleaseValveOutput net hm2_5i25.0.7i77.0.0.input-24 motion.digital-in-03 #ToolReleasedFromSpindleInput net tool-prep-loop iocontrol.0.tool-prepare iocontrol.0.tool-prepared net tool-change-loop iocontrol.0.tool-change iocontrol.0.tool-changed

This is the things I don't know what(or if) to change them to:
net car-enable motion.digital-out-00 carousel.0.enable
net car-ready carousel.0.ready motion.digital-in-00
net car-pos-req motion.analog-out-00 conv-float-s32.2.in
net car-pos-s32 conv-float-s32.2.out carousel.0.pocket-number

To answer my own question:
Parameter #5399 will have a value of -1 if the previous M66 times out. And therefore aborting the routine. Correct me if I'm wrong

But I still don't know where "#<tool_in_spindle>", "#<selected_tool>" and so on get their values from?

Please Log in to join the conversation.

More
10 years 10 months ago #67431 by andypugh
Replied by andypugh on topic VMC related HAL questions.

thewho wrote: ]Where does <tool_in_spindle> come from?


Some named parameters are standard:
linuxcnc.org/docs/2.7/html/gcode/overvie...ned-named-parameters

But #<tool_in_spindle> is not one of those. In this case the #<tool_in_spindle> G-code variable is set by the remapping function preamble:
When there is a "remap" setting in the INI file LinuxCNC looks for a file called toplevel.py, then that imports the remap code. In the case of the VMC demo that imports remap.py which is a tiny file that imports a standard part of the LinuxCNC code called stdglue.
github.com/jepler/linuxcnc-mirror/tree/m...smach/VMC_toolchange contains the toplevel and remap files, the stdglue file is here: github.com/jepler/linuxcnc-mirror/blob/m...n-stdglue/stdglue.py
where line 161 is "self.params["tool_in_spindle"] = self.current_tool"

You need to have the topevel and remap files in your own config too.

Please Log in to join the conversation.

More
10 years 10 months ago #67438 by thewho
Replied by thewho on topic VMC related HAL questions.
No wonder I couldn't find them in your example config :whistle:

But what about these, do I need to change them or are they just "internal" connections?

net car-enable motion.digital-out-00 carousel.0.enable
net car-ready carousel.0.ready motion.digital-in-00
net car-pos-req motion.analog-out-00 conv-float-s32.2.in
net car-pos-s32 conv-float-s32.2.out carousel.0.pocket-number


Do the hal-file I posted look good? Or did I net something the wrong way around?

Please Log in to join the conversation.

More
10 years 10 months ago #67449 by andypugh
Replied by andypugh on topic VMC related HAL questions.

thewho wrote: No wonder I couldn't find them in your example config

You probably should read the remapping page. Most of it isn't relevant, and there is a lot more there than you need to know, but it gives good background: linuxcnc.org/docs/2.7/html/remap/remap.html
It's one of those things to read through and accept that you won't understand fully, but you will get a feel for what is possible.

But what about these, do I need to change them or are they just "internal" connections?

Code:
net [b]car-enable[/b] motion.digital-out-00 carousel.0.enable net [b]car-ready[/b] carousel.0.ready motion.digital-in-00 net [b]car-pos-req[/b] motion.analog-out-00 conv-float-s32.2.in net [b]car-pos-s32[/b] conv-float-s32.2.out carousel.0.pocket-number


Those lines connect the G-code input and output commands to HAL pins, so that the NGC routine can operate the carousel component.

Do the hal-file I posted look good? Or did I net something the wrong way around?

The "net" command automatically sets direction. See it like a bit of wire, the wire doesn't need to know the difference between the current source and the current sink.

Do you have spindle orient (M19) working? And does it need to work for your changer?

Please Log in to join the conversation.

More
10 years 10 months ago #67455 by thewho
Replied by thewho on topic VMC related HAL questions.
Many thanks!
Yes I need orient and yes it's already working like a charm :blink:

I'll give it a try as soon as I figure out how to disable the manual toolchange dialog that I have used so far..

Please Log in to join the conversation.

More
10 years 10 months ago #67457 by andypugh
Replied by andypugh on topic VMC related HAL questions.

thewho wrote: I'll give it a try as soon as I figure out how to disable the manual toolchange dialog that I have used so far..


The manual dialog is activated by being in the ioontrol.0.tool-change -> iocontrol.0.tool-changed loop. If it is not in that loop then it won't be called

Please Log in to join the conversation.

Time to create page: 0.317 seconds
Powered by Kunena Forum