Questions about GPIO | Software | Forum
Topic RSS
2:26 pm
November 25, 2011
Offline10:49 am
June 5, 2012
OfflineDear Stephan,
Just forget my question on the WAIT command, never mind.
Now, I do need to know if I can use my NO switches using the GPIO port, that would not be to difficult for you.
I have an additional question regarding the new Firmware 1.04, that is, setting Global Parameter 78 to a value of "0" all PWM ports would be set to input, but how do I access these ports:
PWMD0 as input
PWMD1 as input
PWMD2 as input
because you only indicate in your new features description how to access them as output and the PWMU as input.
I guess, it would be GIO 1, 0; GIO 2, 0; GIO 3, 0 respectively but I cannot be sure.
Must I configure any pull-up resistor?, as I told you before I am not electrical engineer but mechanical.
I hope you can answer these three questions because they must be simple for you and I really need the answer. Thanks very much.
Best regards
Alberto González García
2:20 pm
June 5, 2012
OfflineHello Stephan:
First of all I want to thank you for your quick response, I do appreciate.
I am going to give you the Electrical Characteristics of both switches (NO & NC) I could use, they are as follows:
- Max. current/voltage rating with resistive load: 100mA/50VDC
- Initial contact resistance: 50 mOhm max.
- Insulation resistance: 1 GOhm min. at 500VDC
- Dielectric strength: 1.000 Vrms
Both have the same Electrical Specs.. The hardware manual of the TMCM-1110 says that the ports are 5V compatible and that the board has switching and linear regulators for supply of on board digital circuits, that makes me think that the max. signal when the switch is closed would be 5V. Thus, I believe the characteristics of the switches might be OK. Do you agree?.
I was told that switches to be used with the reference switch connector had to be NC type. For the GPIO could I use either one?, because I'd rather use the NO type as they are better in quality and have the best feeling when pressed.
I do not see how I can relate the state of the switches connected to the GPIO to the events the WAIT command considers, can you give me a hint?. Else, I'll have to use different programming technics that I believe will be much more energy consuming, like looping until the GIO command gets the desired value. Maybe you know the alternative and efficient way to solve this problem, if you do please let me know where I can find this solution.
I look forward to your quick response. Thanks very much.
Regards
Alberto González García
6:38 pm
November 25, 2011
OfflineAlberto:
- Using this GPIO, the switches must be Normally Closed or they could be Normally Open?
- My switches have two wires, I guess one must be connected to Ground, Pin 1 or Pin 2?, and the other wires to pins "3 & 5" (for motor 0) and "4 & 6" (for motor 1). Would that work?.
For both questions: this depends on your switches. I do not know the type of your switches and their electrical characteristics. Please look into the datasheet of these switches. The output that signals the switches' state must be connected to the GPIO. See the stepRocker hardware manual for maximum input voltage.
- If I want to set all PWMDs and PWMUs to "Input" what bit vector value must I use for Global Parameter 78, "0"?.
Each Input is a bit. The bits value is the state of the respective input. The value of the bit vector is the binary sum of all bits. To set all as input you need to use the value of "0".
Please use the commands SGP, SIO, GIO for theses GPIOs as explained here .
- For the additional digital "Inputs" and digital "Outputs" that I need for other processing purposes, could I use pins "7 & 8" for the Inputs and pins "11 & 13" for the "Outputs"?, must these pins also be connected to the ground pins "1 or 2"?.
Do not connect them to the ground pins.
- In the Firmware V1.03 Manual I read that the GIO command has two related commands SIO & WAIT, but how is it related to the WAIT command. I need to use the WAIT command to wait for a switch to be pressed or released, but using this GPIO pins, what would be the condition to meet so the execution of the program is interrupted?. How are these two commands related?.
The relation of SIO/GIO with WAIT is that you can wait for an event (time or reference switch, see WAIT description) to set or read one of the GPIOs.
3:42 pm
June 5, 2012
OfflineHello Stephan,
Seen, I do not get any answer for my limit switches questions, I guess I'm asking incorrect questions. Let me say I am a Mechanical Engineer and not Electrical and I just do what I can. Sorry to bother.
I'll try to use the GPIO pins to make work my system. My system will have two motors for which I'll use 2 switches for each, when a switch is pressed I'd like the status of the corresponding input port to become 1 (high) and when released to become 0 (low), with those values I can make the motors move to the desired positions. My IDE program will also need one additional "Input" and one additional "Output" for each motor.
- Using this GPIO, the switches must be Normally Closed or they could be Normally Open?.
- If I want to set all PWMDs and PWMUs to "Input" what bit vector value must I use for Global Parameter 78, "0"?.
- My switches have two wires, I guess one must be connected to Ground, Pin 1 or Pin 2?, and the other wires to pins "3 & 5" (for motor 0) and "4 & 6" (for motor 1). Would that work?.
- For the additional digital "Inputs" and digital "Outputs" that I need for other processing purposes, could I use pins "7 & 8" for the Inputs and pins "11 & 13" for the "Outputs"?, must these pins also be connected to the ground pins "1 or 2"?.
- In the Firmware V1.03 Manual I read that the GIO command has two related commands SIO & WAIT, but how is it related to the WAIT command. I need to use the WAIT command to wait for a switch to be pressed or released, but using this GPIO pins, what would be the condition to meet so the execution of the program is interrupted?. How are these two commands related?.
I hope my questions today make more sense to you and I can have a quick answer, which it is really urgent for me. If they do not, please tell me what is wrong or make any question to me so I can try to clear things up and I may go ahead.
I will appreciate very much your response. Thanks very much.
Regards
Alberto González García
Most Users Ever Online: 44
Currently Online:
3 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Trinamic_OK: 47
matt.s: 27
Hellmut1956: 16
ALBERTOGG: 12
BHuijgens: 9
Wolfgang Hoffmann: 8
Member Stats:
Guest Posters: 2
Members: 389
Moderators: 1
Admins: 2
Forum Stats:
Groups: 1
Forums: 7
Topics: 109
Posts: 347
Newest Members: Tom N., ze12o, rmaggertdonn, esalesugg, jovi1989, nummonseras
Moderators: ubbo_ronhardt (1)
Administrators: sradmin (3), TRINAMIC_SK (101)

Log In
Register
Home


