Use bool tag or use int tag and covert to bit values in client

Looking for thoughts on / potential performance issues.

40,000k integer values but only looking at the bit values within those integers
Not writing to those bits only reading.
Displaying around 150 of those bit values on screen at one time.
Option 1. Tag with integer value and then on vision window convert int to bit values for display
Option 2. Tag with integer value and expression tags with bit values of that int
Option 3. Just bool tags with bit values

If a native IA driver, and it supports bits of integers natively, just use #3.

Otherwise, probably #1, but worth testing #3.

#2 is a terrible idea.

AB device

Problem we are seeing is memory usage. My prefered way is Option 3. since the bit values are what is needed and don't care about the int value. However if we switch to Option 1 thinking maybe the ints will take up less gateway memory, but then could reading those bits with expression in the window cause issues on the front end.

Currently looking at 5mil tags / IO server with 5 IO servers; However we still have a few more tags to add and will likely get in the range of 7mil tags per io server. with 5 mil tags we are hitting about 30gb of memory used.

Stay away from the tag() expression function. If using indirect tag bindings to pull the integers to the front end as needed, then extracting the bits in Vision, and only in Vision, then it probably would save significant gateway memory.

Sounds like a fun project!

ok just FYI for anyone else coming across this.

I setup 2 IO servers with

one using a UDT with 4 integer tags and then vision window converting those integers to bit in expression with indirect tag binding.

Other using UDT with 4 folders with 16 bit values of those 4 integers (64 tags of bits values total per udt)

Each IO server had 59982 of these UDTs so ~240k integers vs 3.8mil Booleans

Vision window would display 1000 of these UDTs at one time

Difference in memory was roughly around 10GB Less for integers
Difference in page load was marginal around a 1 sec slower for the integer UDT

I typically prefer to have the bit values in SCADA if the integer value is not meaningful, but in this case I think it is better to go with integer value and convert to bit on display as needed.

Of note- We do not need to record history or alarm these bits or write values from SCADA --> PLC

1 Like