Sieg KX3 and 5i25. Seeking firmware.

More
30 Jun 2016 13:15 #76837 by andypugh
I meant pin 17. It's still stepgen.05

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

More
30 Jun 2016 23:46 #76872 by mooser
parameter or pin 'hm2_5i25.0.gpio.00.is-output' not found

Tried using a three digit (tried 001 and 000) as it defined in the linked doc but no affect.
Is there a loadrt ??? that needs to happen so it knows about the hm2_5i25.0.gpio......?
M

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

More
01 Jul 2016 00:05 #76873 by PCW
The correct name would be:

hm2_5i25.0.gpio.000.is_output

it helps to (when linuxcnc is running)

halcmd show pin *5i25* > 5i25pins.txt
halcmd show param *5i25* > 5i25params.txt

so you have "donor" files for cutting and pasting names

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

More
01 Jul 2016 00:53 #76876 by mooser
ahhh the underscore on the is_output

ok so i did that and checked pin 1 and it's off (0v)
Entered
hm2_5i25.0.gpio.000.is_output 0
and it turned on (5v), so backwards to what I was expecting

Looking at the pins and params
5 bit OUT FALSE hm2_5i25.0.gpio.000.in
5 bit OUT TRUE hm2_5i25.0.gpio.000.in_not
5 bit IN FALSE hm2_5i25.0.gpio.000.out

5 bit RW FALSE hm2_5i25.0.gpio.000.invert_output
5 bit RW FALSE hm2_5i25.0.gpio.000.is_opendrain
5 bit RW TRUE hm2_5i25.0.gpio.000.is_output
Does that seem correct and is because the pin is set to in_not rather than in?

(more baby steps)
M

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

More
01 Jul 2016 01:07 - 01 Jul 2016 01:11 #76877 by PCW
The I/O pin will read 5V if in input mode since it has a pullup resistor
that is:

hm2_5i25.0.gpio.000.is_output 0

will set the pin to input mode (which will read high)
It read 0 when in output mode (since that's the default output state and you have not changed it to a high state yet)

in_not is true = high because the pin was low
you can set the output pin high with
setp hm2_5i25.0.gpio.000.out true
Last edit: 01 Jul 2016 01:11 by PCW.

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

More
01 Jul 2016 01:31 - 01 Jul 2016 01:36 #76878 by mooser
Got it,
hm2_5i25.0.gpio.000.is_output 0 is kind of like "is an output = false" therefor it's an input type of thing

#set io 000 (pin1) to be an output
setp hm2_5i25.0.gpio.000.is_output 1

#turn io 000 on (high)
setp hm2_5i25.0.gpio.000.out true

#turn io 000 off (low)
setp hm2_5i25.0.gpio.000.out false

#invert the state of io 000
setp hm2_5i25.0.gpio.000.invert_output 1

And it actually worked and checks right on the meter

Sweet, some more progress and (minor) understanding

Long weekend so I'm out of the shop for a few days, will look at getting the e-stop and chargepump working Monday
Thanks again everyone for all the patience and help
M
Last edit: 01 Jul 2016 01:36 by mooser.

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

Moderators: cmorley
Time to create page: 0.086 seconds
Powered by Kunena Forum