Tag write expression

Post Reply
DeFacto
Posts: 3
Joined: Mon Jul 07, 2014 11:38 pm

Tag write expression

Post by DeFacto »

Hello,

I do try to shift bits left in the tag write expression on iX T7E, but when i input the value into the analog numeric field, the value that PLC gets is always 0. My code looks like that:

Code: Select all

((value - (value%10))<<4)
I have no idea what is wrong.

tfuk
Posts: 3
Joined: Wed Nov 27, 2019 5:50 am

Re: Tag write expression

Post by tfuk »

Have you tried instead of (value << 4) doing (value*16)? Maybe it will get around with variable type issues and get the same results.

Post Reply