¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

combine serial strings to a single string


 

having a brain freeze.? is there a symbol or module that will combine multiple strings? or a module that will take the 3 digit analog of a thermostat and output it as serial with a decimal?


 

Serial Concatenation
I made one that also adds the delimiter of choice


 

Sounds like you want to use Dynamic Analog Text on a button to display a TSTAT temp value?
You would specify something like %3.1f to display a 720d as 72.0.

?


 

Otherwise, if you're looking to do more than just displaying the temperature on a SG button...
I'd probably use SIMPL+ to perform ITOA conversions and serial concatenations.

Here's an example of string concatenation to create scrolling text with adjustable speed.
?


 

What are you sending the string to?


 

it need it to be a sting value to send.? you a div mod and some logic I can get the whole value and the remainder as seperate strings and just need to output those 2 strings + 1 a fixed string decimal point.? ? String 1, String 3 ".", string 2.? example? ? 70 "." 8 would be combined to create 70.8


 

Use an analog to serial. You will probably need to take your three analogs to equ's then to init's to get them to values the atos wants to see.


 
Edited

Hello John, just write a Simpl+ module like this:


#DEFAULT_VOLATILE
#ENABLE_STACK_CHECKING
#ENABLE_TRACE

ANALOG_INPUT Analog_Temperature;
STRING_OUTPUT String_Temperature;
?
CHANGE Analog_Temperature
{
?? ?INTEGER Tens, Ones;
?? ?Tens = Analog_Temperature / 10;
?? ?Ones = Analog_Temperature - (Tens * 10);
?? ????
?? ?MAKESTRING(String_Temperature, "%d.%d", Tens, Ones);???
}

FUNCTION Main()
{
?? ?WAITFORINITIALIZATIONCOMPLETE();
}

Then you can send in your 708 and it will output 70.8


 

Dizzy

You could do
Ones = Analog_Temperature mod 10;
it would be one less calculation for the system.