Academic Company Events Community Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

Load/Read Velocity in RPM Using Input/Return Vectors in LabVIEW



Primary Software:
Primary Software Version: 4.5
Primary Software Fixed Version: N/A
Secondary Software: N/A
Hardware: Motion Control>>Controllers>>PCI-7340, Motion Control>>Controllers>>PCI-7350

Problem:
I would like to be able to use onboard variables to load the velocity of my axis. When I use the Load Velocity in RPM VI, and pass a variable with value 500 to the input vector, my motor does not move. How can I use an input vector to load my velocity?

Solution:
The easiest method for using input vectors for loading velocity is to use the Load Velocity VI instead of the Load Velocity in RPM VI. You will need to convert the velocity value from RPM to counts per second first. To do this, simply multiply RPM by your motor's counts per revolution then divide by 60. This value could then be stored in an onboard variable and easily be used as the input vector to the Load Velocity VI.

Similarly, you can use the Read Velocity VI and pass a single return vector. The variable would then contain the velocity value in counts per second. You could then divide by counts per revolution and multiply by 60 to convert the value to RPM.

Note: If you absolutely must use Load Velocity in RPM, the velocity needs to be specified in four contiguously numbered variables (for example, variables 1 through 4). Each variable is 16-bits of a 64-bit floating point number. The most significant bit is the second variable, followed by the first, the fourth, and the least significant is the third (MSB to LSB order is 2, 1, 4, 3). Keep in mind that these variables must be formatted as a 64-bit floating-point number.

Related Links:
Developer Zone Tutorial: Understanding Variable Arithmetic in Onboard Programming
KnowledgeBase 2KG7HNS0: Onboard Memory Size of NI-Motion Controller Boards
Motion Control Support

Attachments:





Report Date: 10/21/2004
Last Updated: 01/03/2012
Document ID: 3EC9N5V9

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit