This is not Ignition directly question, but more Python question. And there are many Python gurus in this community…
What I want is to replace integer value with another value.
I have an integer which can have one of 4 values: 1,2,4,8 and I need to replace those with 0,1,2,3.
I know can do this with regular IF:
if postaja1 == 1: postaja1 = 0 elif postaja1 == 2: postaja1 = 1 elif postaja1 == 4: postaja1 = 2 elif postaja1 == 8: postaja1 = 3
but I’m almost confident that there is a better/shorter/nicer looking way…?