7i92 outputs not responding

More
6 years 7 months ago #159341 by xunil
Hi folks, I have a 7i92 connected to a plasma cutter table I've built. The 7i92 has the G540x2 bitfile loaded, but I have most of the accessories turned off on the second connector (P1), as I'm using these pins mostly as GPIOs for things like limit switches and ohmic probing.

Motion control is working great, and inputs seem to work fine - the limit switches work for homing, the ohmic probing correctly senses when it closes the circuit with the material. The GPIO outputs, however, don't seem to allow me to change state, they are stuck outputting a logic level high (~4.975V).

In an attempt to debug this, I've created a barebones HAL configuration which is just loading hm2_eth and the bare minimum of other components to support it. I've loaded this using halrun, and attempted to toggle GPIO pins using setp:
Code:
loadrt trivkins coordinates=XYZ kinstype=BOTH loadrt motmod servo_period_nsec=1000000 num_joints=3 num_spindles=1 loadrt hostmot2 loadrt hm2_eth board_ip="10.10.10.10" config="num_encoders=2 num_stepgens=3 num_pwmgens=0" setp hm2_7i92.0.watchdog.timeout_ns 25000000 addf hm2_7i92.0.read servo-thread addf hm2_7i92.0.write servo-thread setp hm2_7i92.0.dpll.01.timer-us -50 setp hm2_7i92.0.stepgen.timer-number 1

But, all to no avail. The outputs stay stubbornly at logic high according to a DMM connected to the relevant pins. Interestingly, halmeter shows the pins changing! I tried playing with the is_output and is_opendrain pins too, but they didn't seem to make any difference.

I've attached a capture of my halrun session.

Attachment not found



Am I missing something with how to configure the GPIO pins? Is this because I've turned off most of the components, do I need a different bitfile to use part of P1's pins as outputs?

Any and all suggestions and ideas greatly appreciated. Thanks!
-Rob

Please Log in to join the conversation.

  • BeagleBrainz
  • New Member
  • New Member
More
6 years 7 months ago #159344 by BeagleBrainz
Replied by BeagleBrainz on topic 7i92 outputs not responding
[strike]setp & getp are used for parameters
set & get are for pins

I used to mix them up ;)[/strike]

[strike]Good luck[/strike]

Take no notice.......stupid me didn't RTFM properly :blush:

Please Log in to join the conversation.

More
6 years 7 months ago #159345 by PCW
Replied by PCW on topic 7i92 outputs not responding
Nothing in your test file sets any second port bit to output mode

Please Log in to join the conversation.

More
6 years 7 months ago #159346 by xunil
Replied by xunil on topic 7i92 outputs not responding
I really hope it's that simple! I'll try today and report back.

Please Log in to join the conversation.

More
6 years 7 months ago #159347 by xunil
Replied by xunil on topic 7i92 outputs not responding

PCW wrote: Nothing in your test file sets any second port bit to output mode


Do you mean because I'm using setp and not set, as mentioned above? Or something else? How would I set a pin to output mode, was I on the right track with setting is_output to TRUE?

Please Log in to join the conversation.

More
6 years 7 months ago #159348 by PCW
Replied by PCW on topic 7i92 outputs not responding
Yes, any GPIO pin that needs to be an output must be explicitly set to output mode:

setp hm2_7i92.0.gpio.024.is_output true

Please Log in to join the conversation.

More
6 years 7 months ago #159349 by xunil
Replied by xunil on topic 7i92 outputs not responding
I'm glad this appears to be such a simple solution. I will give this a try this afternoon. Thanks!

Please Log in to join the conversation.

More
6 years 7 months ago #159378 by xunil
Replied by xunil on topic 7i92 outputs not responding
Unsurprisingly, this was definitely the problem. Thanks all!

Please Log in to join the conversation.

More
6 years 7 months ago #159532 by andypugh

BeagleBrainz wrote: setp & getp are used for parameters
set & get are for pins


That's not actually true.

Please Log in to join the conversation.

  • BeagleBrainz
  • New Member
  • New Member
More
6 years 7 months ago #159540 by BeagleBrainz
Replied by BeagleBrainz on topic 7i92 outputs not responding
oh ok...my bad, thanks :)
[strike]
Could explain it a bit further, I misunderstood the docs.[/strike]

I RTFM properly....now I get it.
Once again thanks for pointing that out.

Please Log in to join the conversation.

Time to create page: 0.099 seconds
Powered by Kunena Forum