5/6/2010 3:52 PM | |
Posts: 56 Rating:
|
This script works fine with first four tags, on five it doesn't work. I think we exceed the string pointer in some way. |
1/15/2014 11:28 AM | |
Joined: 4/24/2009 Last visit: 8/20/2024 Posts: 2682 Rating:
|
New question splitted to Is it possible to concatenate one string from PLC with a internal string? Best regards O_Moderator |
8/26/2014 4:30 PM | |
Posts: 6 Rating:
|
After many hours trying to figure out why this wouldn't work: Having Tag1 a S7 String (8-bit Text Tag) and Tag2 S7 Int (signed 32-bit ) Dim txt1,txt2,txt3 txt1 = CStr(HMIRuntime.Tags("Tag1").Read) txt2 = CStr(HMIRuntime.Tags("Tag2").Read) txt3 = txt1 & txt2 I decided to takeGabriel_Rabelo'sapproach with explicit objects: Dim objTxt1,objTxt2,txt3 Set objTxt1 = HMIRuntime.Tags("Tag1") objTxt1.Read Set objTxt2 = HMIRuntime.Tags("Tag2") objTxt2.Read txt3 = CStr(objTxt1.Value) & CStr(objTxt2.Value) This simply works and for the moment I just would like to know If anyone please tell me why first approach don't? Thanks @Gabriel_Rabelo |
Follow us on