I am looking to make the home position a variable that I can manipulate in the KINARM, but as of right now I am hard coding the home position. Is there any way to define the x and y coordinates of the home position as variables in Simulink (i.e., col_x, col_y), so that I can input the actual values later on in the KINARM?
Hi Yihui, The way I would do this is to use the Target_Table and set the x-y values there in the first 2 columns. In the Trial_Protocol, you could create a column that would set the row you wanted to use to set your x-y coordinates. You can then use a Stateflow output to a selector to select the row of the Target Table and use the col_x and col_y constants (already defined in every Kinarm task) to pick out the x and y from the task protocol and modify your stimuli. I've attached a picture of what that might look like Cheers, Koloman
Please login or Register to submit your answer