Nacktern Member N Join Date Jul 2021 Location USA Posts 1 Jul 29, 2021 #1 Hi everyone, new user so please forgive any breaches of etiquette. But in RSLogix how can you convert a string in the PLC to all lowercase and move to a different tag? Much appreciated
Hi everyone, new user so please forgive any breaches of etiquette. But in RSLogix how can you convert a string in the PLC to all lowercase and move to a different tag? Much appreciated
daba Lifetime Supporting Member D Join Date Jul 2004 Location uk Posts 5,401 Jul 29, 2021 #2 Nacktern said: Hi everyone, new user so please forgive any breaches of etiquette. But in RSLogix how can you convert a string in the PLC to all lowercase and move to a different tag? Much appreciated Click to expand... This is relatively simple - if the ASCII value of each character is 65 to 90 (decimal), which are A-Z, then add 32, otherwise leave it alone .... Adding 32 (decimal) makes "A" into "a", etc.
Nacktern said: Hi everyone, new user so please forgive any breaches of etiquette. But in RSLogix how can you convert a string in the PLC to all lowercase and move to a different tag? Much appreciated Click to expand... This is relatively simple - if the ASCII value of each character is 65 to 90 (decimal), which are A-Z, then add 32, otherwise leave it alone .... Adding 32 (decimal) makes "A" into "a", etc.
Contr_Conn Member Join Date Sep 2003 Location Ohio Posts 2,582 Jul 29, 2021 #3 Why not to use the LOWER instruction? it will do it for you. From Help: The LOWER instruction converts the alphabetical characters in a string to lower case characters.
Why not to use the LOWER instruction? it will do it for you. From Help: The LOWER instruction converts the alphabetical characters in a string to lower case characters.
Phrog30 Member P Join Date Dec 2006 Location Montgomery, Alabama Posts 1,048 Jul 29, 2021 #4 Contr_Conn said: Why not to use the LOWER instruction? Click to expand... Because harder is smarter to some people.
Contr_Conn said: Why not to use the LOWER instruction? Click to expand... Because harder is smarter to some people.
daba Lifetime Supporting Member D Join Date Jul 2004 Location uk Posts 5,401 Jul 29, 2021 #5 Contr_Conn said: Why not to use the LOWER instruction? it will do it for you. From Help: The LOWER instruction converts the alphabetical characters in a string to lower case characters. Click to expand... Dang! forgot that even existed !!!
Contr_Conn said: Why not to use the LOWER instruction? it will do it for you. From Help: The LOWER instruction converts the alphabetical characters in a string to lower case characters. Click to expand... Dang! forgot that even existed !!!