Home Questions Is there a limit to display object by VCODES

Is there a limit to display object by VCODES

DWQA QuestionsCategory: Custom Task DevelopmentIs there a limit to display object by VCODES
Michael Huang asked 7 years ago
Hi, I am working on a project that will display 64 numbers on the screen. I used VCODES to do that. But I find out there are 10 or 20 missing. I wondering is there a limit for that? Thanks, Jinyang
2 Answers
Koloman Varady Staff answered 7 years ago
Hi Jinyang, I am Koloman, the new tester at BKIN. There is a limit on VCODES. The Process_Video_CMD block limits the number of VCODES to 50. However, well before that limit, writing that many VCODES will reduce the frame rate on Dex Display below 60 Hz. If your 64 targets do not need to move, you could also use permanent targets. Their use is described in the "Creating Task Programs for Dexterit-E" user guide. If these solutions don't work for you, you can contact us through the support email with more details on your task. Cheers, Koloman
Michael Huang replied 7 years ago

Hi Koloman,
The targets display numbers. Those numbers will change during the experiment. And to display number, I have to manipulate VCODES. And, I have another question, when I try to convert int to str by using int2str in the embedded MATLAB. It says “The function ‘int2str’ is not supported for standalone code generation”. So is there a way to do that?

Thanks,
Jinyang

Koloman Varady Staff replied 7 years ago

Hi Jinyang,

You can have up to 499 permanent (also called background) targets with labels to display numbers. You can create a permanent target by adding 100 to VCODE(1) ie. if you want a permanent target circle, it’d VCODE(1) = 101 instead of 1. After that you just need to assign a unique ID in VCODE(8) that is between 1 and 499.

Permanent targets are cached and don’t need to be sent every frame if matrix elements aren’t changing often. This is how they get around data transmission limits that necessitate the limit of 50 on VCODES.

That said, in Dex 3.7 we are lifting the 50 VCODE limit. I think your KINARM might be able to handle more than 50 already as well. If you can email us at our support email, we can verify those details and how to make that happen.

For int2str, a Matlab string is a vector of the ASCII elements. So you should be able to take your number and put the digits in a vector and then add the ASCII offset.

For example, if you have 789, you can use the rem command to isolate the digits and make a vector that is [7 8 9]. ASCII 0 is 48 decimal so add 48 to [7 8 9] to get [55 56 57] and that is the string equivalent to 789.

Cheers,

Koloman

Koloman Varady Staff answered 6 years ago
Just for any reading this, I will add that in Dexterit-E 3.7 there is now a limit of 200 VCODES and there is a new type of VCODE that shows up to 25 identical targets.