7i76e expansion ports don't work properly
- raychar
- Offline
- Premium Member
Less
More
- Posts: 100
- Thank you received: 2
08 Dec 2021 17:20 #228640
by raychar
7i76e expansion ports don't work properly was created by raychar
I set some gpio pins as inputs and outputs, the inputs work but not for outputs. Firstly, I wrote down the respectively statements in the custom hal file. A momentary switch is connected to the input, but the voltage measured on the output is always at high level (i.e is always at 5v or always at 2.7V when having resistor loaded to it). However, In the hal meter observations, they both show true and false changing words when the switch is pressed.
Thanks,
Thanks,
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17971
- Thank you received: 4829
08 Dec 2021 18:32 #228642
by PCW
Replied by PCW on topic 7i76e expansion ports don't work properly
Did you set the "is_output" attribute for the GPIO pins used as outputs?
Please Log in or Create an account to join the conversation.
- raychar
- Offline
- Premium Member
Less
More
- Posts: 100
- Thank you received: 2
09 Dec 2021 12:54 #228698
by raychar
Replied by raychar on topic 7i76e expansion ports don't work properly
Properly no, so where and how to set it?
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19481
- Thank you received: 6532
09 Dec 2021 16:08 #228708
by tommylight
Replied by tommylight on topic 7i76e expansion ports don't work properly
Example:
setp hm2_5i25.0.gpio.000.is_output true
setp hm2_5i25.0.gpio.000.is_output true
Please Log in or Create an account to join the conversation.
- raychar
- Offline
- Premium Member
Less
More
- Posts: 100
- Thank you received: 2
09 Dec 2021 17:09 #228718
by raychar
Replied by raychar on topic 7i76e expansion ports don't work properly
> it works now, thanks,
1) is it the same effect by configure the pncconf by clicking the corresponding IO checkbox to output instead of the default input?
2) I did above 2) before, but I think I mess them up without using the new generated[machine_name].hal, file as I kept on using the old one to replace new one, it is because the new one failed to start up. For the old one, I manually wrote something there so it is ok in starting up....somehow..so long time...that I forgot what stuffs i wrote there ...added axis...screen..
anyway, thanks,
1) is it the same effect by configure the pncconf by clicking the corresponding IO checkbox to output instead of the default input?
2) I did above 2) before, but I think I mess them up without using the new generated[machine_name].hal, file as I kept on using the old one to replace new one, it is because the new one failed to start up. For the old one, I manually wrote something there so it is ok in starting up....somehow..so long time...that I forgot what stuffs i wrote there ...added axis...screen..
anyway, thanks,
Please Log in or Create an account to join the conversation.
Time to create page: 0.064 seconds