Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

flex_load_vs_pos, how to use with onboard program

I am writing an onboard program in C++ on a PCI-7344 controller.  Although a majority of the moves I issue are easily done on a per-axis basis, some of my moves require that the axes start and stop at the same time.  Therefore, I would rather use a combonation of normal per-axis moves and vector space moves.  According to the documentation, the flex_load_vs_pos function takes the following arguments:

 

status = flex_load_vs_pos(u8 boardID, u8 vectorSpace, i32 xPosition, i32 yPosition, i32 zPosition, u8 inputVector);

 

How does the input vector work in this situation?  Say I have onboard variables (vX, vY, vZ) in variables (0x01, 0x02, 0x03).  Do I simply specify 0x01 as the input vector and understand that the function will read the memory locations sequentially or is there some way to specify the three input vectors that represent the coordinates independently?

 

Thank you.

0 Kudos
Message 1 of 2
(3,110 Views)

Hello,

 

The help documentation for this function has a note at the bottom that says: "If you are doing onboard programming and are using inputVector  to get the data this function needs, note that this function reads the variables starting at the memory address pointed to by inputVector in the following order: xPosition, yPosition, zPosition".

 

I hope this answers your question.

 

 

Vivek Nath
National Instruments
Applications Engineer
Machine Vision
0 Kudos
Message 2 of 2
(3,103 Views)