WinCC Flexible ShiftandMask

CharlesM

Member
Join Date
Aug 2005
Location
Arkansas
Posts
1,129
Does anyone have an example on how to use the shiftandmask event in WinCC Flexible?

In a script I am reading a byte out of the plc. I want to break this down into bits and write them out to a text file. I think the shiftandmask will take in the byte and return a 0 or 1 for whatever bit is specified. I just can't get it to work and the help file is not much help.
 
I started with a UDT of 24 bools then made that an array of 500. I quickly found that WinCC Flexible does not like UDTs like this. It wants normal arrays or tags for each value of the array. So I went back and removed the UDT and just went to 3 bytes. I have broke them up in a script before by making a loop for each byte and shifting the bits. I thought the shiftandmask would do this with less work but I could not get it to work at all. So to get everything to work I did as you suggested and made 24 bool arrays of 500.

I am using these for status bits from different parts of the machine. The array is cleared and filled each cycle. When something goes wrong I save this file out and use Excel to find out where my problems are.
 

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
267
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
107
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
755
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,580
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,477
Back
Top Bottom