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.

File Attachment:

File Name: halrun.txt
File Size:8.29 KB


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 or Create an account to join the conversation.

  • BeagleBrainz
  • New Member
  • New Member
More
6 years 7 months ago - 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:
Last edit: 6 years 7 months ago by BeagleBrainz.

Please Log in or Create an account 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 or Create an account 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 or Create an account 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 or Create an account to join the conversation.

More
6 years 7 months ago - 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
Last edit: 6 years 7 months ago by PCW.

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

Moderators: PCW, jmelson
Time to create page: 0.313 seconds
Powered by Kunena Forum