VMC related HAL questions.

More
21 Oct 2017 13:21 #100611 by zinsade
Replied by zinsade on topic VMC related HAL questions.
Hello Daniel Eriksson,
I am happy for you that your machine is running.
Could you post your configuration files here?
This might help me and others.
greetings from Germany
Peter

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

More
29 Aug 2019 12:26 #143551 by CNCDoc
Replied by CNCDoc on topic VMC related HAL questions.
Can anyone summarize what steps need to be taken to implement "carousel.comp" in an existing config and in which post is the latest "carousel.comp" file?
Many thanks

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

More
29 Aug 2019 12:59 - 29 Aug 2019 12:59 #143555 by rodw
Replied by rodw on topic VMC related HAL questions.
Carousel is a standard Linuxcnc component and is thus fully documented. The "latest" version of linuxcnc is 2.9 so this is the latest document of Carousel

linuxcnc.org/docs/devel/html/man/man9/carousel.9.html

If you type man carousel.comp you should get this document.
Last edit: 29 Aug 2019 12:59 by rodw.
The following user(s) said Thank You: CNCDoc

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

More
29 Aug 2019 13:43 #143557 by CNCDoc
Replied by CNCDoc on topic VMC related HAL questions.

I have a question, I have two tool changers, a side arm and a carousel, the carousel is on the machine now and
is a geneva wheel... In order to make the geneva into a rotary axis i was wondering if i could refit the geneva motor with a servo
and rotary encoder instead of using a grey code on the carousel wheel itself. Effectively turning the carousel into a rotary axis.


You could, but there shouldn't be any need.

The "carousel" HAL component that I have written should operate most forms of carousel without hardware modifications.

Have you tried looking at the files in my sample configuration? There are a few parts to it that need to fit together.

1) The "carousel" HAL component. "sudo comp --install --install-docs carousel.comp" should install that. Then it is available for use if you want to.

2) Add an extra few digital IO lines for G-code, change one line in the HAL file. This change is safe:
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES num_dio=6

3) Put the toplevel.py and remap.py files in your config directory. (You can do this without anything breaking)

4) Get the carousel control HAL file working with your carousel. You should be able to add a the (short) toolchange.hal file to your INI file [HAL] section. You probably need to change the number of pockets etc to suit your machine.
You should then be able to move the carousel from MDI with M68 E0 Q{pocket number} followed by M64 P0 to start the carousel and M65 P0 to stop it.

4) Get the toolchange.ngc G-code routine working on your machine. You can set the G-code parameters #<tool-in_spindle>, #<selected_tool> and #<selected_pocket> in MDI then call O<toolchange>CALL.
Various switches need to be wired up in HAL to move actuators and sense positions. look in toolchange.hal to see what the tol change routine is expecting. As an example the signal for moving the carousel in to the spindle is net arm-act motion.digital-out-02 so if that was a parallel port output 17 you would add net arm-act parport.0.pin-17-out to that HAL file.

5) Once the G-code routine is working you can re-map the M6 command to run the tool change G-code routine. First some extra items in the INI file [RS274NGC] and section and either a new [PYTHON] section or modifications to the existing [PYTHON] section
[RS274NGC]
PARAMETER_FILE =        vmc.var
SUBROUTINE_PATH = ./
REMAP=M6   modalgroup=6  prolog=change_prolog ngc=toolchange epilog=change_epilog
[PYTHON]
TOPLEVEL=./toplevel.py
PATH_APPEND= ./
PATH_APPEND= /usr/share/linuxcnc/ncfiles/remap_lib/python-stdglue/
4) Put the toplevel.py and remap.py files in your config directory.

And that should be it.

Do you need spindle alignment too?


Okay then I have misunderstood. Thought it was "carousel.comp" the whole tool change sequence was placed ..
The actual tool change sequence is located in "Toolchanges.ngc"?

Is the cited post the correct instructions for implementing the tool change sequence?

I just need to set an output for spindle origination.

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

More
29 Aug 2019 15:21 #143562 by andypugh
Replied by andypugh on topic VMC related HAL questions.

Okay then I have misunderstood. Thought it was "carousel.comp" the whole tool change sequence was placed ..
The actual tool change sequence is located in "Toolchanges.ngc"?


In the example, config, yes. It could be handles with classic ladder, or with a Python remap, but anything that requires axis movement or M19 spindle orient is most readily done with a G-code remap.


Is the cited post the correct instructions for implementing the tool change sequence?
I just need to set an output for spindle origination.


I think it is close to what you seem to need.
If your spindle drive controls orient internally then you can use the M19 outputs to control the orient. (ignoring the angle output, just handshaking with spindle.0.orient and spindle.0.is-oriented )
The following user(s) said Thank You: CNCDoc

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

More
01 Sep 2019 14:11 #143780 by CNCDoc
Replied by CNCDoc on topic VMC related HAL questions.
Hi almost made the tool change work.

Have some problems.
Do not get the photocell to see that there is no tool in the tool changer before the arm goes in to work properly.

The input on 7i77 works.

Has made the following connections:

M66 P5 L3 Q2 ; Check if mag pos is empty change to L0?
o103 if [#5399 EQ -1]
(MSG, Tool in Magazine! 03)


net pos-is-empty-mag hm2_7i92.0.7i77.0.0.input-29 motion.digital-in-05 #Carousellposempty


when I use M68 E0 Q {pocket number} M64 P0 to start the carousel and M65 P0 to stop it. Positioned carousel in the correct position but when I use with M6 T1 it stays on T2 instead. Haven't been able to look at so much yet.

Then the carousel continues to position when the emergency stop is reset.
Attachments:

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

More
01 Sep 2019 19:42 #143806 by andypugh
Replied by andypugh on topic VMC related HAL questions.

Do not get the photocell to see that there is no tool in the tool changer before the arm goes in to work properly.

The input on 7i77 works.

Has made the following connections:

M66 P5 L3 Q2 ; Check if mag pos is empty change to L0?
o103 if [#5399 EQ -1]
(MSG, Tool in Magazine! 03)

Should this maybe be an L0? Just read the status of the photocell and act accordingly? L3 waits until the pin goes high, but your code will wait 2 seconds if it is low, which seems like a waste of time?

when I use M68 E0 Q {pocket number} M64 P0 to start the carousel and M65 P0 to stop it. Positioned carousel in the correct position but when I use with M6 T1 it stays on T2 instead. Haven't been able to look at so much yet.


That's odd. Can you check what pocket number the carousel comp is getting at its input pin with halmeter?
Which version of carousel are you using? (ie, from which LinuxCNC version?)

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

More
02 Sep 2019 05:40 - 02 Sep 2019 05:43 #143878 by CNCDoc
Replied by CNCDoc on topic VMC related HAL questions.
Which version of carousel are you using?
I use carousel from the following post:

post=67358

This version of carousel.comp should work for your turret.
You will need to install it with "sudo halcompile --install carousel.comp"
If you get a message that halcompile does not exist then look for linuxcnc-dev in the synaptic package manager.

In your particular case you will need to connect the input-pin-name....-not HAL pin to the carousel input pins, because your logic is inverted.

loadrt carousel encoding=bcd pockets=16 num_sense=5 bidirectional=2

Attachments:
Last edit: 02 Sep 2019 05:43 by CNCDoc.

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

More
02 Sep 2019 06:05 #143881 by pl7i92
Replied by pl7i92 on topic VMC related HAL questions.
beside compiling a user optimised comp
you shoudt be going with the system internal
depending on what system you are on 2.7 -2.9
you may be better up
as lots of changes appear to the system and comps do use this new feathers

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

More
02 Sep 2019 06:23 - 02 Sep 2019 17:02 #143883 by CNCDoc
Replied by CNCDoc on topic VMC related HAL questions.
I used it because I have the same milling machine thread starter.

Has 2.7.14 installed

Found this thread may be the same problem ..
forum.linuxcnc.org/24-hal-components/310...unent-debounce#75712
Last edit: 02 Sep 2019 17:02 by CNCDoc.

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

Time to create page: 0.161 seconds
Powered by Kunena Forum