Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Operation of General Purpose Input Buffer

I have included an example which illustrates what I see- I am trying to use a general purpose input buffer to move some data from a motion controller to the host PC. It looks to me like the write to the buffer uses the first 2 32-bit words for something else. In fact, I find the first word must be between 6 and 13 for the operation to work at all and the first 2 32=bit words are lost and replaced by 2 zeros at the end. I have read the documentation and tried several things. I must be missing something. Thanks for your help.

Bernie Sander
0 Kudos
Message 1 of 2
(3,084 Views)
Bernie,

I took a look at your code and modified it slightly to work correctly and attached it below. Generally, two variables are used as a sort of 'header' for array operations such as this. This is described in the FlexMotion VI Online (LabVIEW Help for Motion)for the "Write Buffer.flx" which states:

"To write data to the buffer from an onboard variable, use an Inp Vect other than 0xFF. The variable you specify for
Inp Vect indicates the starting point for the data for this VI, including Number of Points and Regeneration Mode, followed by the data to be written to the buffer. So in order to write ten data points to the buffer, you must use twelve variables."

So I added two variables and now your code runs as expected.

Regards,

JR A.
Applicat
ion Engineer
National Instruments
Message 2 of 2
(3,084 Views)