I am making a task where I am tracking the subject’s points based on performance, and I would like to display the total number of points after each set of reaches. I am trying to use a Show_Target_With_Label block to display this text, but I need to modify the VCODE based on the actual number of points. I have tried using an ASCII Encode Simulink block to try to convert the points (double) to ASCII, and then replacing columns 15:64 of the VCODE, but it’s not working. Any tips on how to do this?
Hi Xin Li,
A good trick to get the ASCII value of a character is to do: double(‘a’)
To get the ASCII value of a single digit number (say n), I do: double(‘0’) + n
I’d recommend checking out the data visualization sample task https://kinarm.com/download/robot-data-visualization-demo/ – I write a lot of dynamic numbers and a modify a lot of label vcodes in that task.