Notepad icon Notepad — Notepad for ARC: store project notes and connection details in a themed window Try it →

ARC Pro

Upgrade to ARC Pro

Unleash your creativity with the power of easy robot programming using Synthiam ARC Pro

#1  

here ya' go... an example of assigning a string to a variable


$anything="put anything here you want"
#2  

OK, that much I know. What I am looking to find out is how the string works in the weather script. I have changed it so many times that everything is a blur.

Thanks for your help.

#3  

Mel ... look over the examples again... the light bulb will go off soon.... remember the dt app passes the values to ARC.... you do not need to assign data to any of the saved variables... the values loaded into the variables are done by The DT app itself....

Look at My code again in the other thread....

Author Avatar
PRO
United Kingdom
LinkedIn Twitter Google+ YouTube
#4  

Mel, have a look at my script on the Kangaroo, it shows string manipulation, conversion (to and from decimal etc) and also arrays.

Tony

Author Avatar
United Kingdom
LinkedIn Twitter Google+ YouTube
#6  

Also have a look at my tutorial on the syntax for data retrieval. Since data is commonly assigned to a variable it should aid you in understanding a little better.

What is it specifically you can't get a handle on? If a variable exists you can use it a million different ways to be honest. If you have a variable called $temperature you can use this in a few different ways;

Say("It is currently "+$temperature+" degrees")

Or


IF($temperature > 21) # I'm British we use centigrade
  Set(D0, On) # Enable relay for fan
  Set(D1, Off) # Disable relay for heater
ElseIf($temperature < 12)
  Set(D0, Off) # Disable relay for fan
  Set(D1, On) # Enable relay for heater
Else
  Set(D0, Off) # Disable relay for fan
  Set(D1, Off) # Disable relay for heater
EndIf

Or

FileWrite("C:\log.txt, $date + " - " + $time + ":" + $temperature)

I could go on and on and on but with no specific topic to cover we could be here for a while.