Hi guys,
Do anyone have experiance with splitting GI values into bits?
Like if the GI value is = 65535 is want to split that into 16 bits -> [1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1]
Hi guys,
Do anyone have experiance with splitting GI values into bits?
Like if the GI value is = 65535 is want to split that into 16 bits -> [1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1]
Do you want to only use TP, or is KAREL an option for you as well?
And what is your desired output? The way you represent it as an array of 0/1's can be done with KAREL, but you could also use a series of 16 flags if you can't use KAREL for example.
Anyhow, you would want to do logical AND comparisons with the values for the individual bits. In KAREL this is very easily done. With only TP at your disposal it's definitely possible as well, but it might not be very readable.
Clever!
That will ofcourse split the GI automaticly, could it be that, this would not work on the virtual Robot ? or have i made the setups wrong ?
In RoboGuide it doesn't work to me, too. But using a real one it works:
I think your setup is correct, but it will not work the way you did it.
By simulating the GI, any value you assign to it will not be "transferred" to the DIs. However, if you try the same setup but as DOs and GO, then you can see that the principle will work.
Another way would be to assign the GI to RACK 34, SLOT 1 (Flags) and then turn the associated flags on and see that your GI has its value changed.
Thanks all, this have been very help full!