I am using a setup with a PCI-7340 card, NI Motion 18.0, and LabView 2018.I have everything wired and configured correctly and am able to perform position moves as part of a custom test device where I use the servo to drive a shaft.
In general, most of my moves are done using Relative Position operation mode. However, I also have some velocity mode moves mixed in where I monitor external sensors and do not care about the position of the servo shaft. I've noticed that if I request a relative position mode move after I have done a velocity mode move, the position that is referenced for relative motion is not the current position at the end of the velocity move but rather the last position from the last relative position move. The 7340 position count is updated throughout the velocity mode move, and so I feel the relative move should reference the position count at the time the command is issued based on the literature that I have read. However, that does not appear to be the case. As an example, if I command a positive 2 revolution relative move, the servo moves 2 revs in the positive direction. I then switch to velocity mode and move another approx 10 revolutions in the positive direction. If at this time I execute another positive 2 revolution relative move, the servo actually rotates 8 revs in the negative direction. I wanted to know if this is normal behavior or if I am misusing toolkit commands.
Solved! Go to Solution.
This link below has more information about relative, absolute, and velocity modes:
Set Operation Mode
I'd take a deeper look into this page and see if anything sticks out that could be causing the behavior you're seeing.
Thank you Jiwhan. As per the details on the Set Operation Mode module: "in relative position mode while motion is not in progress, loaded target positions are interpreted with respect to the current position at the time the value is loaded."
This was not the behavior I was observing. I submitted a support ticket for this and was recommended a work around. At the end of my velocity move, I read the current position using Read Position.flx and then add or subtract my desired relative move counts. This new calculated position is then used to perform an absolute move. The absolute move resets the current position register in such a way that all subsequent relative moves work as expected. It's a simple enough work around and works for what I am trying to do. Thank you for your input.
Please consider marking the workaround as the solution for this post as this could help other users find answers more easily.