The program recognizes that Int64[0] == 1073741824 (which is the value of just bit 30 on), but not 2147483648 (which is the value of just bit 31 on or a 1)
So, I replaced the code with this, but it is not what I truly want, nor will it work with my application…

Elseif (IsBitOnInNumTableElement(0, Int64, 31)) Then
String01 = “I know bit 31 is On, but I don’t know if it is the only bit On”;

And that worked when I typed a value of 2147483648 for Int64[0].
Why won’t the first example work? Is there something I’m overlooking?
I am only simulating this in PAC Sim… Will it actually work with a SNAP PAC R1?
Any feedback would be appreciated.

I remember when I developed a 40+ command combobox in Pac Display and came to find out it doesn’t support Int64 (it says the value is not within range; max value to write was 2147483647)… I thought it was something in common with my current problem. … Anyways, did they ever fix that in PAC Display? Or is 2147483647 still the max value to write (meaning just the first 30 bits can be used)?

If you go into PAC Display, make a new combobox. Add an “Item” (I called it “Turn Bit 31 ON”). Click on Send Value. Add an Int64 Tag. Then in the “Fixed data” field Type 2147483648 (which is Bit 31’s value). In Version R9.3b (which is what I have), it says “Integer not within required range”.
At that point, I just assumed the combobox in Pac Display only supported 32bit integers - Even though you can choose a 64bit Tag.

Like I said, I don’t know if they fixed it or you are limited to a 32bit integer for a combobox in Pac Display or if there is some other way around it.

Great, I’ll have to upgrade soon then. I just tried it here again and in Version R9.3b it throws up an error and seems to only support 32bit integers. Well done… You get the rest of the afternoon off with pay.

Yeah, I tried the bit thing which does work, but it doesn’t clear the other bits in that particular Int64 Tag. In my application, I’m trying to set up 64 total commands with using only 1 value and only 1 command (bit) can happen at a time. So writing a “bit” value… example 1, 2, 4, 8, 16, 32, 64… 512, 1024 … -9223372036854775808 (bit 63) …etc., will only allow 1 bit to be ON at any given time within the same Int64 Tag.
By using Send Discrete, if the operator chooses from the list then changes his mind, the previous selection was never reset… Writing a Value does. -So, that’s why I have chosen to use Send Value.