Hi I needs some help to GSM sendTextMessage component
I have an SMS I will send from string variables
for example
var1 [20] = Hello I am Trying
var2 [20] = To send a SMS
var3 [20] = true Variable
var4 [20] = but I can not
var5 [20] = send morethan
var6 [20] = 28 characters
SMS_str [100]
If I send it as normal sms string as this it will send the entire message ok
FCD_0fa91_GSM1__SendTextMessage(FCV_OUTNUMBER, FCVsz_OUTNUMBER, "Hallo I am Trying\rTo send a SMS\rtrue Variable\rbut I can not\rsend more than\r28 characters", 129);
But if I send from variables such:
// Calculation:
SMS_str = var1 + var2 + var3 + var4 + var5 + var6
// Call Component Macro: GSM1::SendTextMessage(outNumber, SMS_str)
FCD_0fa91_GSM1__SendTextMessage(FCV_OUTNUMBER, FCVsz_OUTNUMBER, FCV_SMS_str, FCVsz_SMS_str);
So, it comes only 28 characters to my phone
Anyone know why?
Hi I needs some help to GSM sendTextMessage component
Moderator: Benj
-
- Posts: 101
- Joined: Tue Sep 01, 2015 9:37 pm
- Been thanked: 14 times
- Contact:
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: Hi I needs some help to GSM sendTextMessage component
Hi
Due to temporary memory restrictions our string concatenation cannot cope with multiple additions,
try this instead ...
Hope that helps,
Leigh
Due to temporary memory restrictions our string concatenation cannot cope with multiple additions,
try this instead ...
Code: Select all
SMS_str = var1
SMS_str = SMS_str + var2
SMS_str = SMS_str + var3
SMS_str = SMS_str + var4
SMS_str = SMS_str + var5
SMS_str = SMS_str + var6
Leigh
-
- Posts: 101
- Joined: Tue Sep 01, 2015 9:37 pm
- Been thanked: 14 times
- Contact:
Re: Hi I needs some help to GSM sendTextMessage component
Thanks for your help Leigh it works as it should now ))