XHC-HB04 wireless MPG pendant HAL module

More
16 Oct 2016 03:35 #81679 by Spectre
I am using Fusion 360 to generate the Gcode...here is a snippit It was working before but now not working again. I had a bit of deal sorting out the speed of the spindle but have thet pinned nicely it is within 30 rpm across the whole range as I dont have a encoder on the spindle but I setup my Dynavibe prop balancer I use on my fullsize aicraft to read the rpm at 1 PPR

I also have another issue you might be able to hep me with.
I have changed the homing position on the mill to the most common now of the table all the way to the main stanchan of the mill and the table is now the max left corner so the table homes to the back and to the right. I also had a issue where the Y axis was not going in the negative direction on the DRO when coming forward to the front of the mill. I have made the origin of the noseblock the front left top corner of the stock that sits upagainst the fixed vice jaw. For some reason I cant get it to sit directly where it is supposed to on the mill table in the representation on Axis. Also if I stop the process when doing the first stage when I reload the program it doesnt start from the same position....dont know why yet. It would be nice if it all just worked easily. The mill even though at this stage it is just running on a standard parallel port out of LCNC sounds and moves so much better on LCNC than when I had it on Mach3. It is supposed to be 10 times better once I eventually get it running on a full Mesa system

(1001)
(SAV NOSEBLOCK)
(T1 D=3. CR=0. TAPER=118DEG - ZMIN=-27.901 - DRILL)
(T2 D=8.5 CR=0. TAPER=118DEG - ZMIN=-29.554 - DRILL)
(T3 D=8. CR=0. - ZMIN=-14.95 - FLAT END MILL)
(T12 D=19. CR=0. - ZMIN=-24.7 - FACE MILL)
N10 G90 G94 G17 G91.1
N15 G21
N20 G53 G0 Z0.
(DRILL1)
N25 M9
N30 T1 M6
N35 T2
N40 S6000 M3
N45 G54
N50 M9
N60 G0 X12. Y-22.
N65 G43 Z15. H1
N75 G0 Z5.
N80 Z2.
N85 G1 Z-0.75 F582.
N90 G0 Z5.
N95 Z1.25

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

More
16 Oct 2016 03:39 #81680 by Spectre
This is what it is
Attachments:

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

More
16 Oct 2016 10:01 #81683 by Spectre
I found out why there was a crazy measurement. Somehow I had values put into my tool 1 tool table in XY and Z...got no I dea how values ended up in there but that explains when I did a dry run with tool 1 it was not going to the place it was supposed to. Also I found that for some reason when I have 6000 in the Gcode it will not run the spindle but if I put in a lesser value it will work when running the Gcode. The PWM is programmed in the HAL file to be 6000 rpm but it doesnt like it when it sees it. Ii may have something to do with the VFD and 6000 rpm is 200 hz maybe the VFD wants to go higher and it just doesnt recognise that. So in the program I set the rpm to 5500 and it seems to work fine. Hopefully I will get some chips going tonight or tomorrow night. I will do a dry run and see how it all pans out

Thanks for your help and bearing up with my whinging

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

More
16 Oct 2016 18:46 - 16 Oct 2016 18:46 #81694 by dannym

Hi Danny

I had Sarah help me directly with it. It now works but it really is a mission to get LCNC to do anything. You pretty much have to be a coder. You can put a system INI in that works but there is always issues...having to comment parts out and not run them. Everything is so specific. As much as Mach3 is old and tired and slow it does work pretty much out of the box and reasonably easy to get going. There is not of course anything for fine tuning like you can in LCNC but everything so far has been a struggle getting this all to work.


I WISH being a coder would help. The HAL's concept of making gate primitives is more like VHDL for silicon than programming, only made exceptionally difficult. I mean I can't just say "A=(B | C) & (!D & !E) on servo_thread". Nooo... though this unambiguously could be interpreted into HAL literally, you need to add numbered/named NOT, AND, and OR gates, add to a thread, create nets and tie all this together into an unreadable, error-prone mess.

I outgrew Mach3 pretty quickly. It had a critical bug with the Smoothstepper FPGA card and there would never be a fix. It has critical problems with the trajectory planner not always following acceleration rules. Like I observed just hitting left/right fast jog without waiting for a full stop would violate accel rules and cause a stall.

Making complex hardware connections in Mach3 was pretty awkward too. The driver for the XHC mpg never worked correctly, very problematic lags. Much, much happier with LinuxCNC.
Last edit: 16 Oct 2016 18:46 by dannym.

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

More
16 Oct 2016 22:30 #81705 by Spectre
Hi Danny

I couldnt help myself so went out to the shed last night to do another dry run...It is still doing funny stuff...I have no idea why yet. The Gcode looks correct but the program is not sending the machine correctly yet all appears to be correct. I will check tonight when I get home and I will make a simple program up to test the XY and Z movements...but it must be another silly corrupt file... anyway I will find out.

Well I am good with hardware but not with software. I design a lot of electronic stuff domestic and commercial and hardware including micros etc and all the I/O interfacing has never been a issue but for some stupid reason I have never been able to fully grasp any software. I can sort of understand it and can cut and paste and get it all to a stage to work but unless it is only simple coding then my brain just cant seem to get a handle on it

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

More
16 Oct 2016 23:06 #81706 by dannym
Alright. My experience is it's best to be VERY specific in what does and doesn't work and the exact error message, and a copy of the HAL and INI files all in one. I know the error logging is exceptionally poor in that it includes hundreds and hundreds of irrelevant messages- it takes some practice but you can learn to just scroll to the one which matters.

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

More
17 Oct 2016 00:32 #81707 by andypugh

I WISH being a coder would help. The HAL's concept of making gate primitives is more like VHDL for silicon than programming, only made exceptionally difficult. I mean I can't just say "A=(B | C) & (!D & !E) on servo_thread". Nooo... though this unambiguously could be interpreted into HAL literally, you need to add numbered/named NOT, AND, and OR gates, add to a thread, create nets and tie all this together into an unreadable, error-prone mess.


If you are a coder then it actually gets a lot easier. A lot of the HAL components are there so that users can do what they want without having to compile anything. If you consider that Linux requires any kernel module to be written in C, and that the realtime components are kernel modules, then HAL starts to look quite clever.

Your sample problem, as it happens, is easily handled by LUT5LUT5 though I am not a fan of the docs of that function. LUT5 basically takes the 5 input bits as a binary index into to the bits of the function parameter and returns that bit.

If you are happy with C, then it is very easy to create your own HAL components. In fact a few minutes of reading up on C syntax is enough for very simple components: linuxcnc.org/docs/2.7/html/hal/comp.html

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

More
17 Oct 2016 09:20 #81714 by Spectre
Hi Danny

Well this is very interesting. Today I did a test file with different drill holes over a block at specific distances and places. I loaded it today and ran the machine. It was perfect in all dimensions and also the origin setting. There must be something wacky I did with the file I posted above. I will redo it and see. I am not using the MPG HAL and INI files at the moment I have dropped back to my standard file as I was having all this trouble. I found the tool offset issue and the RPM I am sure now I know what it is. I will do another Savblock file and try it as it has more operations than just drilling although it was the drilling that went haywire. If it all turns out ok then I will re enable the MPG files and see what else I can stuff up. Thankyou for your help Danny and also Andy on this. I just hope the more I work on this LCNC the easier it gets.

Mark

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

More
18 Oct 2016 10:55 #81767 by Spectre
Thought I would let you know the positioning issue was something in the drawing I did for that particular file the sav noseblock. There was a strange plane in there and even though it wasnt turned on Fusion somehow picked it up in the post. Did a trial run tonight on a new file I did and it works fine.

I need to find somewhere on this forum to discuss the tool table and how to use it properly. Pathpilot videos are fantastic on it and how they have done it..makes it really easy.

Also I tried to rest the tool height manually during each stage and I cant find how to do it properly. I looked for some info on it but to date I havent found it

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

More
07 Nov 2016 17:31 #82557 by jtc
Hi!

I'm using a LHB04 pendant (5m with usb cable). Its installed but I can only jog with MPG 0.001mm per pulse. Pressing step++ button don't result in a scale increment.

By searching on the module code:
if (_button_step && xhc.button_code == _button_step) {
			xhc.step = 10*xhc.step;
			if (xhc.step > 1000 || xhc.step <= 0) xhc.step = 1;
		}

Its what I expected. The xhc-hb04.button-step its working and I can see it changing on halshow, the xhc.button_code is the value set on the layout file?

can the code be different in this version? or anything its else?


João

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

Time to create page: 0.103 seconds
Powered by Kunena Forum