(you are viewing a thread; or go back to
list of threads)
Changing Pin for Serial Command (by Marcelo)
hi all,
I liked this compiler... I have a question about how I/O are used. Is there a possibility to show a I/O like a number and send this via serial?
thanks!
(no subject) (by Jonathan Westhues)
Do you mean like to read the voltage at the pin with an analog-to-digital converter, and then print that value as an ASCII string over serial? Look at the "A/D Converter Read" and "Formatted String over UART" ops.
uh... (by Marcelo)
Well, I don't want read this voltage... Let me see how i explain this... When i put a coil, for example, i can to put this source in Internal or uC pin... But i think in other option that send a command via serial.
So, i don't use microcontroller pin with ldmicro code to interface but use another microcontroller to activate this...
ok?
thanks for all...
(no subject) (by Jonathan Westhues)
If you want to receive data over the serial port, then look at the "UART Receive" op.
(no subject) (by Marcelo)
Hi... I would like to use this without explicit this in ladder code. I know that i have to change source code to do this... Where i modify the code to insert my modification?
Look, i need to change code for change I/O in another uC and i have to do this via serial...
Like this:
Ladder: -------------] [--------------
switch
Send this command via serial: switch-on (ON) or switch-off (OFF)
Thanks for all!
(no subject) (by Jonathan Westhues)
Use code like in the attachment, but with an internal relay.
(no subject) (by Marcelo)
Jonathan, thanks for all... But a wanna change your code... So, when i atribute a pin for anything, in the list have: "serial command to send/received".
Can you help me to do this in your code?
Thanks again...
(no subject) (by Jonathan Westhues)
It would of course be possible to add this to LDmicro, but I am not interested in doing so. I prefer to keep serial as a separate op. If the user wishes to, then they can define whatever protocol they need, and write their own code to set internal relays based on serial input.
The source is available for download, and information about building and modifying it is available in the archives of this forum.
Post a reply to this comment:
|