question

Marco Baccalaro avatar image
3 Likes"
Marco Baccalaro asked Matt Long commented

How to update and read kinematics in FlexSim 2017?

In the attached model I have initiated a kinematic On Reset of the Source.

In its OnDraw trigger I update the kinematic but it doesn't work.

In a script I used the getkinematics too but works neither.

Maybe something changed in FlexSim 2017?update-kinematics.fsm

FlexSim 17.0.0
kinematicsflexsim 2017
· 3
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Sam Stubbs avatar image Sam Stubbs ♦ commented ·

There shouldn't be anything broken between the versions. I noticed one thing in your Custom Draw Code. Instead of current.kin, which is a reference to the value of the label, you need to say current.labels["kin"] to reference the label treenode. There may be a some other things, have you gone through the Kinematics tutorial to check and see if you've done everything the same?

0 Likes 0 ·
Marco Baccalaro avatar image Marco Baccalaro Sam Stubbs ♦ commented ·

Thanks, I'm new to the dot notation.

Using the current.labels["kin"] the getkinematics command works but I'm still not able to use the updatekinematics one.

update-kinematics-1.fsm

1 Like 1 ·
Arun Kr avatar image Arun Kr Sam Stubbs ♦ commented ·

Hi Sam,

The user manual tutorial method applied to marco's model is also not working.

Regards,

Arun KR

0 Likes 0 ·

1 Answer

Sam Stubbs avatar image
2 Likes"
Sam Stubbs answered Matt Long commented

So I just checked with the developers. It looks like there could be some kind of bug with the updatekinematics in 2017. They're looking into it. Sorry for the inconvenience.

· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Matt Long avatar image Matt Long commented ·

This has been fixed for 2017 and will go out in the next bug fix. In the meantime, @Marco Baccalaro you can fix the issue by updating your command to say:

updatekinematics(kin, current, -1);
4 Likes 4 ·
Marco Baccalaro avatar image Marco Baccalaro commented ·

Ok, thank you Sam.

0 Likes 0 ·