Internet PLC Forum
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Search
Login
Register
Internet PLC Forum
»
General
»
Technical support
»
String Variables
« previous
next »
Print
Pages: [
1
]
Author
Topic: String Variables (Read 13169 times)
hasslof
Newbie
Posts: 3
Tjena
String Variables
«
on:
February 25, 2002, 08:33:03 AM »
Is there any way to "increase" the number of avaible string variables (Max 26? A$-Z$)?
«
Last Edit: December 31, 1969, 04:00:00 PM by 1076562000
»
Logged
support
Global Moderator
Hero Member
Posts: 3174
Re: String Variables
«
Reply #1 on:
February 25, 2002, 09:12:19 AM »
No, the number of string variables are fixed. There may be creative way of getting around this restrictions: ?You can create strings out of dynamic data using the STR$(n), HEX$(n), INPUT$(n) , "+" operator etc to reduce the number of string variable required to store static string constants. You could also use an IF THEN ELSE structure to assign different string constansts to a string variable:
e.g. IF ?X = 1
? ? ? ? ? ?A$ = "This is Line 1 with X = "+STR$(X)
? ? ? ELSE
IF X = 2
? ? ? ? ? ? A$ = "This is 2nd Line with 2X = "+STR$(X*2)
? ? ? ENDIF
ENDIF
Hope this will help.
«
Last Edit: December 31, 1969, 04:00:02 PM by -1
»
Logged
Email: support@triplc.com
Tel: 1-877-TRI-PLCS
hasslof
Newbie
Posts: 3
Tjena
Re: String Variables
«
Reply #2 on:
February 25, 2002, 10:22:15 AM »
I will give it a try. By the way, thanks for the help regarding the com-port (ascii-string) problem I had. But I had to use pin 2,3,5,7 & 8 to get it to work. Don?t ask me why. Anyway, It works perfect now. Thanks!
«
Last Edit: December 31, 1969, 04:00:00 PM by 1076562000
»
Logged
support
Global Moderator
Hero Member
Posts: 3174
Re: String Variables
«
Reply #3 on:
February 25, 2002, 11:16:34 AM »
I think I know why 7 and 8 is needed. Your equipment needs RTS and CTS handshake. In our PLC, pin 7 and 8 are shorted together, so when you connect pin 7 and 8 to our PLC the RTS and CTS signals are looped back.
«
Last Edit: December 31, 1969, 04:00:00 PM by 1076562000
»
Logged
Email: support@triplc.com
Tel: 1-877-TRI-PLCS
hasslof
Newbie
Posts: 3
Tjena
Re: String Variables
«
Reply #4 on:
February 26, 2002, 05:36:46 AM »
Ok.
Thanks!
«
Last Edit: December 31, 1969, 04:00:00 PM by 1076562000
»
Logged
Print
Pages: [
1
]
« previous
next »
Internet PLC Forum
»
General
»
Technical support
»
String Variables