HAL_INPUT - EMC2 initial pin values
I have PC with EMC2.3.x that is using custom joypad as a pulse generator
works just fine using X-position, Y-Position and few buttons
Now I switched to EMC2.4.6 on a different PC:
When I start EMC2 all values sent by joypad are zeros including button states that supposed to be ON and X, Y positions that should be 30000
As soon as I click handwheel or push a button, value for corresponding pin changes and reflects correct value in HAL Meter
Rest will stay at 0 until I touch them
I loaded hal_input it from terminal - I see all pin values as expected on start
Any ideas what changed in 2.4.6?
Please Log in or Create an account to join the conversation.
www.linuxcnc.org/docview/html/man/man1/hal_input.1.html
BUGS
The initial state of keys, buttons, and absolute axes are erroneously reported as FALSE or 0 until an event is received for that key, button, or axis.
Any ideas how to fix this?
Please Log in or Create an account to join the conversation.
Whilst I know next to nothing about Python, it looks like it responds to "events" from the USB-hid system. I think that means that there is no easy solution because events are only passed on to the driver when a control state changes. Thus, it looks like a usb-hid problem rather than an EMC2 one.
As I understand it python files are either interpreted or runtime compiled, so if you can find hal_input.py on your system you could experiment. I don't know where the file "lives" on a normal emc2 installation so can't actually point you to it.
How custom is your controller? I wonder if the problem can be solved at your end, for example changing the values on non-zero controls after EMC2 has started up.
Please Log in or Create an account to join the conversation.
halrun
loadusr -W hal_input -KRAL ArkUSBCNC
show pin
Also why it works OK in ver 2.3.x?
This is a USB-HID device based on microchip PIC18F2450 HID code and I can change it if necessary,
I can toggle bits and quikly change position numbers, but I prefer not to do it since it can cause unpredictable moves.
Please Log in or Create an account to join the conversation.
I think this is a question for the developers list, where the big-brains hang out. (including Jeff, who wrote that driver)
Please Log in or Create an account to join the conversation.
I will put it to the mailing list...
Please Log in or Create an account to join the conversation.
what is bugging me is that 2.3 documentation also mentions this bug but initial valuses are set all the time
It looks like something in EMC2 code works different
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
I even tried to copy configuration from 2.3 and used it with 2.4 - same results
This only thing I can think about is the PC with 2.4 is much faster computer: 2GHz vs 700MHz with much more memory
May be it has something to do...
I will try to install 2.3 on another harddrive on Faster PC to see if it is not something speed related.
Please Log in or Create an account to join the conversation.
got inconlusive results:
Position X, and position Y have correct initial value when EMC2 starts, but buttons remain in "0" state iven I have some "ON"
again, running it under terminal shows correct values
not sure what to say...
Please Log in or Create an account to join the conversation.