WinCC flexible autolognon

dracekvo

Member
Join Date
Apr 2011
Location
home
Posts
17
Hi,


I have barcode scanner connected in to PLC. Every user have own barcode. When user scan your barcode I must make him active on touch panel.

Is it possible?

sorry for my bad english.
 
I have connected a barcode scanner to wincc on the serial port of the HMI and then using the mscomm from windows you may need to install the activeX first i cheated a little and loaded microsoft vb express this then registered all the components for me. Then you need a script to open and close the port again mine opens the port automatically on the initial startup of the HMI. You can then read the barcode and place it into a db word for testing or checking user and enable what ever you need too.
I have the script if you need and example, this does depend on your HMI and whether it has a serial port or not.
 
mscomm Script example

Three pictures have been added notice on the barcodescreen the mscomm activeX this is put in the overview screen if you want to use it regardless to the screen your on or just put it on the screen you wish to use it this however will require you each time to open the port on changing to that screen and closing the port when leaving that screen. To get to the overview screen go onto your startup page and to the top of the woring area left click and hold the top of the working area of the screen and drag down.

barcodescreen.jpg open_port.jpg clear_buffer.jpg close_port.jpg
 
Maybe you dont understant me.

I wrote example:
1. touch panel is locked (is morning)
2. user comes to his shift and scans his ID card with bar code
3. PLC compare code with internal database, when matched, plc send user name, role in to some tags
4. when tags is sets, touch panel automatically unlocks (logon) with user name and privileges.
 
The above examples are code that i did for my specific need.

You need to have barcode scanner connected to your HMI when the scanner reads a barcode you place that value into a DB word(this will be in your PLC) then you can compare against you database (probably) another DB in your PLC then send a PLC signal(memory bit) to the Screen to unlock it. The point being you will always have the port open to read a barcode and move it into a DB word first. Word of warning at each scan of the barcode when you move the value into you DB you need to clear the buffer ready for the next barcode if not the barcode will not read a second time without first clearing the buffer.
 
Unlock Screen

I have added another script of mine this is for reading the buffer however i have added a line that is circled in red this is for the logon.

The 2 words in brackets are the password value and the username in that order. So once you have made the compare with the barcode reader you can then move that persons password and username into the database once the script reads that data (with script you need to code here first you can then activate that line to unlock the screen.

logon.jpg
 
Ok, thanks very much. It's very useful for me.

So, my last question. Where you find Logon function? I can't find it before.
 
if you right click in the script page then choose "List System Functions" scroll through that list it is there it is also accessable within wincc under the properties of a screen or button etc under the events and select it from the list there. but from script access from right clicking the script page as stated first.
 

Similar Topics

Hi, We have upgraded our laptop which includes Windows 11. It appears that WinCC flexible 2008 advanced does not support Windows 11. What...
Replies
11
Views
264
Hello everyone I Have an Issue with the usage of recipes in Wincc Flexible 2008, I create the recipe to change the values in a fast way The...
Replies
0
Views
106
Hi colleagues.We do data logging system.We want to record three temperatures under a certain condition. We prepared the project as follows. We do...
Replies
1
Views
753
Hello to everyone. I change the value of a "PQW" with a button in Wincc flexible. The code of the button is defined as M102.0. Value reset...
Replies
10
Views
4,574
Hello Friends I have installed WinCC Flexible 2008 SP5 Update 2. I have open the software, but the Transfer option does not appear. Is It...
Replies
2
Views
1,471
Back
Top Bottom