Hi, just looking at your code quickly.
vec_VAL4 has no value until after it is tested in the if statement.
What is its initial value?
You may need to set it in setup.
Also post your code in # code tags and it will look better, also in the IDE select TOOLS then AutoFormat to set the layout up.
Tom...... ![]()