FactoryTalk View-When entering a password I get "test$00" instead of "test" ?

Cydog

Member
Join Date
Feb 2018
Location
Maryland
Posts
313
FactoryTalk View-When entering a password I get "test$00" instead of "test" ?

Good Afternoon,

I'm working on a HMI project with FactoryTalk View ME. I'm using a String Input Enable and a TAG (string {4} ) in my CompactLogix PLC . In the program I'm using a EQU , to compare what I expect the operator to enter , such as "test" as a user for now. But the problem I'm having is , when I type and enter in the HMI I get "test$00" instead of "test" . What could cause this ?

The idea of the EQU is to compare the entered User Name to the Stored User Name . Of course "test$00" is not equal to "test" . Where do you think I went wrong ?

Thanks so much for your help ,
 
Are you using an ordinary STRING datatype with a .DATA length of 82, or one with a specific user-defined Length ?

What is the value that the HMI writes into the .Length sub-element of the String type tag ?

In general, "test$00" is just "test" but with the Length incorrectly set to 5, thus exposing a null character when displayed.
 
Mr. Roach ,

Yes. The HMI is writing a 5 into the length ( .LEN ) Data is 82. What would cause that ? I know I have something setup wrong .

Thanks
 
I'm not sure what versions of software you are using but for the newer FactoryTalk Linx v6, which replaced RSLinx Enterprise v5, there is a known but patchable anomaly which is quite specific to the issue you have described...

1072230 - FactoryTalk Linx 6.00: Writing to a String tag in Logix 5000 displays an extra $00 character
Access Level: Everyone

Hopefully that's it?

Regards,
George
 
Yes Sir ,

That sounds like it . I guess there is no way to mask that and take off the $00 is it ? I'll install the patch tomorrow. I'm under the gun on this project , and I don't want to take a chance on a software crash.

Thanks so much for the tech note link . That sounds like it .
 
Disclaimer - I'm not stringing you along...

That is good to hear.

I was thinking about your request here...

Cydog said:
...I guess there is no way to mask that and take off the $00...

...and thought I'd throw this out there as a possible temporary solution in case someone just cannot patch immediately -

Note: this has not been written, tested or even verified in a controller...

Use a Compute (CPT) instruction with your new string tag length (.LEN) as the Destination operand. Let's say...

pwdstringDest.LEN

For the Expression operand enter the original string tag length (.LEN) minus "1". Let's say...

pwdstringSource.LEN-1

This will take your example 5 character length from the HMI with the null character ($00) appended and subtract "1" from it, leaving...

pwdstringDest.LEN = 4

Next, use a Copy (COP) instruction and make the Source, Destination and Length operands as follows...

S: pwdstringSource[0]
D: pwdstringDest[0]
L: pwdstringDest.LEN

This should now only copy the first 4 characters from the Source string to the new Dest string.

So Source string 'test$00' now becomes Dest string 'test'. You could then use this string to compare against your password database.

Note: while that would be interesting to try, and might get someone out of a bind, I would still advise everyone to wait until they can patch. I cannot guarantee the above will work, but even if it does, I cannot be sure it would work for all conceivable string lengths someone might try. If this anomaly always appends a single null character ($00), no matter what you enter, then it might be OK, but if it doesn't, and only pads sometimes, then you might end up stripping valid characters from the end of the passwords.

If at all, use with caution and full Geospark Disclaimer applies!

Regards,
George
 

Similar Topics

Hey everyone and anyone that can lend a helping hand. I have a project that I am being asked to add some animations of Solidworks or "3D" models...
Replies
8
Views
117
I can't seem to get the Panel View Plus 7 standard edition to downgrade to V_11, when I check the AB downloads and compatibility websites for this...
Replies
1
Views
95
Hi, I'm trying to export data from a DataGrid to Excel using VBA, but I'm getting an error "Object doesn't support this property or method". The...
Replies
0
Views
61
Hello, I made a change in alarm setup in factory view studio, where I changed a alarm message text. After that I made a run application and...
Replies
0
Views
74
I'm using legacy recipe to download a recipe to the PLC. A little background, the recipes are large. They are broken down into 6 tables, each 16...
Replies
2
Views
80
Back
Top Bottom