Bitwise operation in HMI designer
I have to deal with some 16-bit statuswords. Every single bit of these words I would like to visualize within HMI designer. What is the most efficient way to do this?
Should I do the bitwise operation already in the REXlogic or can I do the bitwise operation directly in the table with the connection strings? The latter would be ideal but for the moment I can only accomplish this by using first an ALIAS before doing the actual bitwise operation. Can it not be done directly?
Test example :
the solution you described using means of REXYGEN HMI Designer is the best I can think of now. Please, be aware that the ALIAS name used in expression need to be in alphabetical order before the expression name (e.g. ALIAS "temp" and expression "test" works fine - vice versa ALIAS "test" and expression "temp" won't work).
I would suggest to use the bitwise operations within REXYGEN algorithm. You can easily see what's going on there in Watch mode. Also using function blocks can be sometimes more "readable" (this is not general truth).
Thanks for your reply, we are doing it now as you suggested within the logic itself. Now we end up with many of these :
Every word consists of 2 status-bytes of which I only need three the most. Every byte is representing the status of an alarm and these bits are for: active alarm, not-acknowledged alarm, sensor failure)
Maybe the creation of a custom svg object to represent these statuses would be the best. It would save me a lot of copy/pasting and looking up different bits... which leave a lot of room to make mistakes
@apollo Hi Kris,
what about using library subsystems (see doc: https://www.rexygen.com/doc/ENGLISH/MANUALS/RexygenStudio/RexygenStudio_ENG.html#x1-360005) in REXYGEN?
Any change in the library source subsystem will make changes in all references used in algorithm instantly. Such a subsystem can look like:
It would be (time-wise) more convenient for me to create one SVG-object which can display all different statuses from a single alarm. Now the connecting of all these different alarm-bits in HMIdesigner is really time-consuming... but I'll manage...
That's why I think that it would be a better solution to make a custom SVG that accepts a byte with all the necessary info...then only one connecting string is needed for one alarm. But for now, I'll stick to what I'm already doing because following the path of creating new custom objects will cost me even more time I'm afraid.