Home
Prox / RFID
Verichips
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Photographs
Miscellany
Resume / Consulting
Contact Me

LDmicro Forum - Sending several variables over UART.

(you are viewing a thread; or go back to list of threads)

Sending several variables over UART. (by Miguel)
Do you have any example on how to send several variables over UART using just one instruction?

The instruction "Formatted String Over UART" just send one variable at a time.

I would like to send 4 or 5 variables at the same time, just separeted by commas.
Mon May 11 2020, 14:50:10
(no subject) (by MGP)
Use your imagination ;) 5 times 1 variable is also 5 variables.
3 digit number (546): /3/x2C (result 546, )
Tue May 12 2020, 05:10:50
Sending several variables over UART. (by Miguel)
I think you are very clever. Unfortunately that is not the answer I am looking for.

I have done that already. So again, Do you have any example on how to send several variables over UART using just one instruction?
Tue May 12 2020, 12:31:54
(no subject) (by MGP)
You have done this already? and it does not work? strange.
Can you post the LDfile.

There is no such instruction only a combination of instructions.
Tue May 12 2020, 12:46:48
Sending several variables over UART. (by Miguel)
Let me explain myself again, I have done that before and it works pretty well. But it takes several steps to get the job done.

i am looking to send several variables over the UART using just 1, 2 or 3 steps.

Maybe asigning all the variables to a string.
For example : String= variable1,variable2,...variableX

I appreciate your help
Tue May 12 2020, 13:50:09
(no subject) (by MGP)
Because of the cycle time, it is difficult to send as many characters within 1 cycle time.

Let's calculate: 10mS cycletime at 9600b, 1char = 10 bits uart, that is 960char / sec or 9.6char / 10ms and then you have to calculate the conversion time and add the commas.

As you can see it is very difficult to send a string of more than 9 char within 1 cycle time and it is better to send a variable with 5x.
Tue May 12 2020, 16:05:53
Sending several variables over UART. (by Miguel)
MGP:

Thank you very much for the feedback.
I guess I will follow your advice.

I appreciate your help either way.
Tue May 12 2020, 16:40:58
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):