Hal configuration 7i96s + 7i85 + whb04-6

More
10 Jul 2023 15:20 - 10 Jul 2023 15:27 #275139 by routerman22
Hi All,
It has been a while since my last post, but there has been some progress in the build. This is a follow-up of :
forum.linuxcnc.org/39-pncconf/47881-index-homing-mesa-7i96s

I'm running lcnc 2.9.0

I have flased my 7i96s with (in mesact fw list):
  • 7i96s_7i85d.bin
  • 5 Axes of Step and Direction
  • 1 Encoder Input
  • 1 Smart Serial Port
  • 11 Inputs 6 Outputs
  •  
  • P1 Daughter Card 7i85
  • 5 RS-422 Serial Channels
  • 4 Encoder Inputs
HMID result: pastebin.com/u0KurYA4

As mesact does not fully support my configuration i did the base config in pncconf:
(see attachement). This works (note without the XHC-WHB04B-6 stuff)

I tested the XHC-WHB04B-6 pendant via the command line and that works well.
When i tried to integrated it into my config i get all kind of signal does not exist messages, starting from line 49 (see attachement).

The items remaining to get my build working are as follows:
- Add 4 encoder inputs from the 7i85 (differential + index) the the X,Y,Y1,Z axis (10000 ppr) to the config
- Fix the WHB04B-6 hal signal issues.

The connection of the 7i85 is as follows:
ENC0 = X
ENC1 = Y
ENC2 = Y1
ENC3 = Z

Note: i dont use lcnc for doing anything to the control loop, that is handled in the delta drive.
I need the index for doing index homing on the lcnc side.

I'm quite new to hal file editing, and i'm having a hard time figuring this out. any help would be appriciated.


 
Attachments:
Last edit: 10 Jul 2023 15:27 by routerman22.

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

More
10 Jul 2023 18:20 - 10 Jul 2023 18:36 #275148 by routerman22
There is progress!

I basically got the WHB pendant to work. had to comment out a lot of HALGUI stuff in my machine hal file.

Only weird thing is that the component seems to crash at some point. causing linuxcnc not to be able to detect it anymore,
And the information on the screen (pendant) to be out of date.
youtube.com/shorts/NsYFCCLa8Lc
Attachments:
Last edit: 10 Jul 2023 18:36 by routerman22.

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

More
10 Jul 2023 19:09 #275150 by routerman22
More progess: I added AND2 component as I'm using Delta ASDA-M to put my Y axis in Gantry mode.
it is in individual mode untill it is homed, after an IO needs to be put HIGH to allow it to go in gantry mode.
I used the following component and signals:
#*******************
#AND logic (to enable DELTA ASDA-M Y axis gantry function when Y,Y1 is homed
#*******************
loadrt and2 count=1
addf and2.0 servo-thread
net my-sigin1 and2.0.in0 <= joint.1.homed
net my-sigin2 and2.0.in1 <= joint.2.homed
net both-on [HMOT](CARD0).ssr.00.out-03 <= and2.0.out
#*******************
#end of AND logic code
#*******************

Updated files added
Attachments:

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

More
10 Jul 2023 20:48 #275158 by routerman22
I'm having issues with the index signal. when looking in HAL, I never see it change.
This is how it is connected to my delta servo (counts work fine)



Not sure what is going wrong here :(

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

More
10 Jul 2023 21:32 - 10 Jul 2023 21:33 #275164 by routerman22
so on the servo i reduced it to 100ppr to make it easy to spot. and it seems to be working.
Just cant figure out how to get it done in HAL. As my changes dont seem to work
Attachments:
Last edit: 10 Jul 2023 21:33 by routerman22.

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

More
11 Jul 2023 07:28 #275194 by routerman22
Does anybody happen to have a working encoder + index hal which I could use as the basis of mine?

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

More
11 Jul 2023 13:31 - 11 Jul 2023 15:02 #275209 by PCW
Typically the index pin signal is too short to reliably check with halshow or halmeter
(especially at high encoder resolutions). This is because the GUI only samples the hal pin every
50 ms or so and even LinuxCNC only samples the pin at about 1 ms intervals. This is why
the index is detected in hardware and the index handling in hal is done with index-enable,
not the index pin itself.

To check an index input, use halcmd to set the index-enable signal true and the see if
index-enable goes false at the index location, for example:

halcmd -kf

halcmd: sets x-index-enable 1

(rotate shaft and check for x-index-enable going false)
Last edit: 11 Jul 2023 15:02 by PCW.
The following user(s) said Thank You: routerman22

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

More
13 Jul 2023 00:51 #275308 by Hakan
Regarding the occasional crash. The pendant component is compiled with the assert() function activated. Deactivate assert() and recompile the component. There will still be the occasional crash but the component will recover and continue to work after a second or two.

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

More
14 Jul 2023 21:58 #275451 by routerman22
Did not have any ussue with it anymore. I must have done something dumb.

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

More
14 Jul 2023 22:05 - 14 Jul 2023 22:11 #275452 by routerman22
I think i found a bug in lcnc.something very strange happens when i enable the index homing.Note: homing with index = no works perfect. With yes weird stuff happens:Step 1 machine is on, x axis is (lets say middle of travel 400mm)Step 2 home x-axisaxis goes to home switch -> backs off home switch -> looks for index -> index found -> instead of setting that point as machine origin (normal behavoir), it still thinks machine origin = position of axis when you turn the machine on. So in this case it thinks index is at -400mm , instead of machine origin (0mm). It will now move the 400 mm back (back to axis position when it was turned on) using hom final velocity speed.When i set index homing back to no it works as expected.  Im very confused. I have tested the index independently via the procedure listed above.My version is: axis.ngc-AXIS 2.9.0~prel git20230208.f1270d6ed7oneither im missing something or there is a bug in my version. Im very confused ? 
Attachments:
Last edit: 14 Jul 2023 22:11 by routerman22.

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

Time to create page: 0.225 seconds
Powered by Kunena Forum