6i24 Not Communicating With Breakout Board

More
10 May 2020 00:42 #167205 by PapaJenks
I have 2 6i24 boards with one breakout board each. The breakout boards are just optoisolators for the input pins. I'm not getting any response in hal when I test an input button. I'm getting 0v to the input pin of the 6i24 card when the button is pressed but the pin state does not change in the halmeter. I'm doing tests in a terminal window with a single thread. I double checked that the read function for the card is in the thread. I'm not sure what to check or try next. Any advice would be appreciated.

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

More
10 May 2020 00:58 #167210 by PCW
Are you sure you have the correct GPIO pin?
halshow might be more useful since you can "watch"
many pins at once

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

More
10 May 2020 01:43 #167217 by PapaJenks
Replied by PapaJenks on topic 6i24 Not Communicating With Breakout Board
Is there a way to use halshow without going through axis? Can I just run it from the terminal?

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

More
10 May 2020 01:53 - 10 May 2020 10:50 #167218 by PCW
Yes, if you setup a real time environment with halcmd you can launch
halshow from another terminal, heres an example:

halcmd: loadrt hostmot2
Note: Using POSIX realtime
hm2: loading Mesa HostMot2 driver version 0.15
halcmd: loadrt hm2_eth board_ip=10.10.10.10
(bunch of stuff printed)
halcmd: loadrt threads
halcmd: addf hm2_7i96.0.read thread1
halcmd: addf hm2_7i96.0.write thread1
halcmd: start

then you can launch halshow from a different terminal
Last edit: 10 May 2020 10:50 by PCW. Reason: Ack forgot "start"

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

More
10 May 2020 15:00 #167268 by PapaJenks
Replied by PapaJenks on topic 6i24 Not Communicating With Breakout Board
I gave that a shot with no luck. However I did notice that the hm2_5i24.read.time pin is at 35694 while the hm2_5i24.read_gpio.time pin is at 0. Should they both have a similar value? Do I need to add hm2_5i24.read_gpio to the thread?

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

More
10 May 2020 15:03 #167271 by PCW
No, you should not need the GPIO read function

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

More
10 May 2020 15:32 - 10 May 2020 15:44 #167278 by PapaJenks
Replied by PapaJenks on topic 6i24 Not Communicating With Breakout Board
I noticed that in halshow every one of my inputs is true even when I disconnect the breakout board from the card. I jumped one of the gpio pins to it's corresponding ground on the 50 pin header and none of the inputs changed. I'm getting 5 volts from all of my physical gpio pins even though the corresponding hal pin says the output is false.
Last edit: 10 May 2020 15:44 by PapaJenks.

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

More
10 May 2020 15:52 #167280 by PCW
All inputs are expected to be true if unconnected (there are pullups on all I/O pins)

Can you set a pin into output mode and see the corresponding input follows the output state?

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

More
10 May 2020 16:24 #167282 by PapaJenks
Replied by PapaJenks on topic 6i24 Not Communicating With Breakout Board
I set a pin to output and the input is changing state with the output. The voltage at the header pin is also going from 0 to 5 volts as I change the output from false to true.

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

More
10 May 2020 16:39 - 10 May 2020 16:59 #167283 by PapaJenks
Replied by PapaJenks on topic 6i24 Not Communicating With Breakout Board
It's only the inputs that aren't working, regardless of whether I have 0 or 5 volts at the header pin, the input stays true.
Last edit: 10 May 2020 16:59 by PapaJenks.

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

Moderators: PCWjmelson
Time to create page: 0.083 seconds
Powered by Kunena Forum