Concatenate or not?

Kidblue

Lifetime Supporting Member
Join Date
May 2003
Location
Worcester
Posts
698
Hi people,

I was wondering if there was an easier way to achieve an issue i have with STRINGS in AB. Currently i programme lots of applications using GSM modems. I have been quite happily creating alarms and sending various alerts to mobile phones. I have spent quite a while getting this just right (the client can now enter upto 6 mobile numbers on the HMI), and then sequentially sending an alarm to all six mobiles....so far so good!

What i've recently started doing is embedding variables into the text messages (pressure, temperature, hrs run etc)....again, this is all working nicely. What i would like to do is streamline how i assemble the dynamic text messages. At the moment, i bolt together several strings (using ACN), and then send the final string to the modem. Is there a way of copying one string to an exact location in another string (Or merge them)? I just want to try and limit the number of strings used and ACN commands......Like i said, i have it working, but would just like to slick it up!! ;)


Thank you.
 
Greetings Rob,



your question would be a lot easier to answer if you could post an example of what you’re doing ...



but even sight-unseen I’ll say this much ... just because you COULD make it slicker, doesn’t necessarily mean that you SHOULD ...



remember that somewhere down the road some poor sap is going to have to figure out how this thing works ... there’s a LOT to be said for keeping things simple, even if that means some step-by-step-brute-force techniques are used to make the magic happen ...



but if you can post a sample, I for one would love to take a look at it ...
 
I've attached a sample bit of code to demonstrate where i think i may be over complicating things regarding the strings and concatenate......o_O

I've just left in the relevant parts relating to the GSM sending. There are 6 conditions, but i've just highlighted 2 of them:

1. Dryer shutdown (Text alert + the Plant room temperature at the time of shutdown embedded.)
2. Compressor Hours Run: 3 Compressors (A,B,C) - With 3 Hr counts (L9:0, L9:1, L9:2) embedded into the text message.

What i'd like to do is have one string address, and merge/copy multiple strings with it, but in specific positions within the string LEN.

Thank you. (y)
 

Similar Topics

Hello All, I have a little problem that I need some help with. I have got a 17 digit number coming from a supplier. It's basically a barcode...
Replies
11
Views
3,060
Hi, I have a list selector which I want to display the recipe found inside a plc-5. The recipe is store in an ascii table with each character...
Replies
4
Views
1,418
I am trying to concatenate two INTs into one DINT I have try following Knowledgebase Article 552006 but I am not having any luck. I have found...
Replies
6
Views
3,085
Hi all, I have trouble compiling the following simple Cicode function in Citect V7.0r1. Compiling gives the error "Operand expected". FUNCTION...
Replies
1
Views
3,919
I have an existing program for a machine which can run 50+ different parts. Each part has 10 parameters allocated and I have to modify the program...
Replies
1
Views
1,774
Back
Top Bottom