Ilc151 gsm

emilg

Level-1
Beiträge
52
Reaktionspunkte
1
Zuviel Werbung?
-> Hier kostenlos registrieren
Hello

If i want a ILC151 GSM to recive a SMS with the text;
'Motor 1 ON' then Output1 = 1
'Motor 1 OFF' then Output1 = 0

I tryed to compare the strings, but you cant compare strings i found out....
What to do then?

Do you have som examples for string compare?
I tryed to download Example Mobile connections, but there is only the SMS basics, and not something about what to do with the string....

- Emil
 
Hello Emil,

you can compare your string with the function "EQ_STRING" out of the Firmware library.
Attached an example screenshot for your application.

Edit: As alternative you can change your sms in the way to have a numeric value at the end. Like "Motor 1 State:0" and "Motor 1 State:1". This string can be easily cut and the last
character changed into a boolean.

Kind regards
Ulrich Kleinschmidt

Compare_String.PNG
 
Zuletzt bearbeitet:
May be you can simply solve your problem strings containing only numbers?
"1" for motor on
"0" for motor off
Can be simply modified "STRING_TO_Integer" (or similar) and then you can use "if -> then"

But to be honest: I haven't a clue what the string with the SMS really will contain - I do not use that. Only sent string or additional information?
You can extract information you need with String operations like "LEFT"

Hope this helps,

Rainer
 
Hello

It's because i will use the PLC as a status reporter from 5 other plc's. I will transmit Errors to SMS and then be able to turn PLC 1, 2, 3, 4 and 5 ON and OFF. (Or the start signal)
I don't want the Customer to remember if it's "4" for turn PLC 2 ON or was it OFF?
Then it's easy for the customer write the complet text....

- Emil
 
Zuviel Werbung?
-> Hier kostenlos registrieren
But if you compare the length of an SMS, an SMS has always 160 characters, no matter how much text is there. The rest is filled up with 0x00 from your provider.
 
Zurück
Oben