FactoryTalk View Studio Tags - What am I looking at?

Erica_S

Member
Join Date
Aug 2011
Location
Louisville, KY
Posts
6
Hello all.

I am pretty new to using FactoryTalk for PanelView files. So pardon me in advance.

So basically there are some pre-existing files that I need to add multi-state indicators to. I want to link it back to the PLC file in RSLogix 5000, but when I look at an example tag for one of the existing indicators I see:

nCzeU.png


I understand that the statement in the curly braces {} is reading the tag from the RSLogix Tag database, but is there a reason why they would need to shift the bits to the right? I am misunderstanding why they would need a formula I suppose.

If this is something that requires how the program was written to explain, I can dig into it on my own. Was just curious and confused! Thanks!
 
{Value} >> 0 & 3 is an unusual expression because of the zero.

The Bit Shift Right (>>) and Bitwise AND (&) expression operators are very commonly used when converting from PanelView Classic terminals that used the RIO network. This was a way of taking several bits out of the middle of a 16-bit data word and using them to represent a number, rather than using the whole word.

In this case, bit-shifting to the right by zero bits doesn't have any effect on the value. The bit shift operator might just be present so that this expression appears similar to other expressions in the project that bit shift a nonzero number of positions.

The Bitwise AND (&) is essentially masking the lower two bits of the tag (decimal 3 = binary 11), so that only those are evaluated as the State Value of the Multi-State Indicator.

An example:

PV1.SftyFlt.GateSwInd[0] Multi-State Indicator
0000 0000 0000 0000          0
0000 0000 0000 0001 1
0000 0000 0000 0010 2
0000 0000 0000 0011 3
0000 0000 0000 0100 0
0000 0000 0000 0101 1
0000 0000 0000 0110 2
0000 0000 0000 0111 3



and so on.
 
Ah, I see. That would make sense considering that some of the other tags do not have zero as a shift. I do believe there is a RIO involved, so that makes sense as well.

Thank you so much! Had to get the rusty brain thinking again. Hehehe. :)
 

Similar Topics

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
117
Hi all, I'm having an issue with connecting View Studio emulation to a real PLC. I am running View Studio 8.01 on a Hyper-V virtual machine...
Replies
0
Views
252
Hello. I have a Project I'm doing in Factorytalk View Studio. One of my displays I created has a bunch of red x's on all of the objects I created...
Replies
6
Views
606
So, I'm new to the PLC world (fresh graduate) and at my job I've been pretty much only helping out the other programmers with simpler tasks while...
Replies
1
Views
612
Good morning, I have a project coming up that will require my HMI runtime to toggle from English to Spanish via selector switch. What is the...
Replies
0
Views
451
Back
Top Bottom