Siemens Simatic OP270 Display Password Entry

qee

Member
Join Date
Dec 2003
Posts
23
Hello All,

I’m tackling an application where I need a user to enter a password on a Siemens OP270B display to login and gain supervisor privileges. The password MUST be hard coded in the PLC (where verification will take place). The trouble I have is that to have a password entered with this particular type of display it must be in STRING format. I need to send the password back to the PLC from the display and compare it to the password value in the PLC, but I cannot understand how to compare data of STRING type in Step 7. Does anyone have any ideas how I can achieve this?

Thanks Qee.
 
Well, there are a couple of ways to do it. No matter how it's entered on the screen, the values in the PLC can be evaluated any way you want. But we'll stick with the string type for now.

The password is being sent to a specific location in the PLC. Let's assume the password is "PASSWORD". This would take eight bytes, and we'll say the data area is DB100.DBB0 to DBB7. If you looked at this area in a VAT table and selected character format, you would see the actual "PASSWARD" characters.

To see if the password is correct, you would have to do two comparisons, because you can only load four bytes at a time. So, it would look like this:

A(
L 'PASS'
L DB100.DBD 0
==D
)
A(
L 'WORD'
L DB100.DBD4
==D
)
= password is ok

Like I say, there are other ways, but this should work.

Edit: I forgot to mention that there is a slight difference between characters and strings in S7. The true string data type contains a couple of leading bytes of info pertaining to the string length, but you can ignore these and evaluate the characters directly as I wrote above. I just didn't want to to be confused when you looked at the string in the VAT table and saw those leading bytes.
 
Last edited:
Thanks S7 Guy for your suggestion.
I will give it a go today.

All the best,

Qee.
 

Similar Topics

I'm trying to set the clock in the PLC based on the time/date that's set on the HMI. So far this doesn't appear an easy thing to do with Siemens...
Replies
2
Views
5,464
Hi Guys, I have setup some trending for a process that I'm working with using a Siemens Simatic OP270 Touch screen display. So far so good, but...
Replies
1
Views
2,509
Hello All, I need to change the page on a Siemens OP270B Display from the PLC. I understand that within the “Area Pointers” section it’s possible...
Replies
5
Views
5,981
Good Evening , It has been several years since I used Siemens Software . I’m looking to purchase the software for a Siemens Simatic S7...
Replies
4
Views
447
I'm just trying to figure out the right method of adding a DO card to an existing rack. It's not the *next* open slot, but I have to move the AO...
Replies
5
Views
526
Back
Top Bottom