VMC related HAL questions.

More
21 Jul 2015 08:32 #60788 by sspeed33317
Or if you are interested I can remove the carousel and fit the Side mount tool changer instead??
And see if we can get that one working also.

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

More
21 Jul 2015 15:48 #60795 by andypugh
Replied by andypugh on topic VMC related HAL questions.

Or if you are interested I can remove the carousel and fit the Side mount tool changer instead??.


I have put quite a lot of effort into the carousel component and simulator....

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

More
22 Jul 2015 07:12 #60813 by sspeed33317

Or if you are interested I can remove the carousel and fit the Side mount tool changer instead??.


I have put quite a lot of effort into the carousel component and simulator....


Thank You for that.

It will be using the Home and Index routine... z up to tool change...carousel in, release/z-up/index new tool/z-down/clamp , carousel out and back to work...

Well hopefully I will get back to work on the machine shortly.
I have some new cannon sockets coming so I can adapt the new wiring to the old axis harnesses.

Its been miserable hot here also.. but it wont cool down until the end of September.

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

More
25 Dec 2015 19:07 #67324 by thewho
Replied by thewho on topic VMC related HAL questions.
Well some time has passed to say the least :silly:

I'm getting to the point that I need to get the tool changer to work and now that I have some time of work I thought it would be a good opportunity to give it a go (again..)

I've studied Andys example and have gotten the gist of it but then I found out that my carousel "encoder" gives out a non-standard bcd code.. Meaning that's 1,2,4,8,10 and not 1,2,4,8,16 as I was expecting. It's also inverted as in high signal = 0.
1 = 1 1 1 1 0
2 = 1 1 1 0 1
3 = 1 1 1 0 0
...
10 = 0 1 1 1 1
11 = 0 1 1 1 0
...
15 = 0 1 0 1 0

And after that facepalm experience I started to make an Arduino PLC-like thing to control the toolchanger.
But then I got hung up on how to communicate what tool is requested (Linuxcnc > Arduino) and how to get Z to move when I wanted it to (Arduino > Linuxcnc)

Andy's post over at page 2 is almost easy enough for me to follow :pinch: But then the carousel position sensor screwed me and I was back to the beginning :(

Soo.. Is my Arduino plans just silly and should never have been done in the first place?
and where do I go from here?
I really appreciate all the help I can get :)

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

More
26 Dec 2015 11:20 #67338 by andypugh
Replied by andypugh on topic VMC related HAL questions.

I've studied Andys example and have gotten the gist of it but then I found out that my carousel "encoder" gives out a non-standard bcd code.. Meaning that's 1,2,4,8,10 and not 1,2,4,8,16 as I was expecting. It's also inverted as in high signal = 0.
1 = 1 1 1 1 0
2 = 1 1 1 0 1
3 = 1 1 1 0 0
...
10 = 0 1 1 1 1
11 = 0 1 1 1 0
...
15 = 0 1 0 1 0


Actually, that looks like 1,2,3,4,5,6,7 in binary Gray-code. The carousel component should be able to read that directly if you wire the in-not pins to the carousel inputs in Gray-code mode.

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

More
26 Dec 2015 13:09 #67341 by thewho
Replied by thewho on topic VMC related HAL questions.
Did a search on gray code but i cant see the resemblance? It also says "BCD" on the carousel position sensor.
DEC  BCD  Gray  Mine(inverted)
1.  00001 00001 00001
2.  00010 00011 00010
3.  00011 00010 00011
...
10. 01010 01111 10000
11. 01011 01110 10001
...
14. 01110 01001 10100
15. 01111 01000 10101

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

More
26 Dec 2015 13:58 #67343 by andypugh
Replied by andypugh on topic VMC related HAL questions.

Did a search on gray code but i cant see the resemblance? It also says "BCD" on the carousel position sensor.


Sorry, you are right. I miss-read the sequence.

It does look like BCD. BCD means that each digit of a decimal number is encoded as 4 bits.
0000 0001 == 1
0001 0000 == 10
1001 1001 == 99

You can do this in HAL, if you need to. Use two weighted-comps (one for each set of 4 bits) and add them together.

But, better would be to add BCD as an encoding to the carousel.comp file.

I am 200 miles away from my LinuxCNC machines over Christmas, but I will see if I can put something together today.

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

More
26 Dec 2015 17:16 #67347 by thewho
Replied by thewho on topic VMC related HAL questions.
I'm truly amazed over the time you spend helping me and everyone else here on the formums :)

I'll poke around a bit more in your example and see if I learn something :whistle:

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

More
27 Dec 2015 00:28 #67358 by andypugh
Replied by andypugh on topic VMC related HAL questions.
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:

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

More
27 Dec 2015 19:32 #67379 by thewho
Replied by thewho on topic VMC related HAL questions.
I get "Command not found" when I run halcompile.. :( I've checked and I have linuxcnc-dev (1:2.6.4) installed

I've hardly used Linux before so there might be something obvious I'm missing here?

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

Time to create page: 1.047 seconds
Powered by Kunena Forum