Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

flexmotion reading from board speed

Hello,

In a CVI project, when executing a command that reads data from the board like "flex_read_pos" or "flex_read_adc", how long does it take from the moment of excecution to the time I get the data back from the board? According to my tests, it seems to be roughly an 8ms execution time. I am using a FlexMotion 7334 board and executing the program on a Windows XP system. Thank You.

--Firoz Memon
0 Kudos
Message 1 of 4
(3,596 Views)
Firoz,

The time it takes for these commands to read back is going to very depending on the application. Some factors are, if you are running an on board program, how many call you are making to the board, and what else is happing on the system. All of these factors will effect the time for the board calls.

A. Talley
Applications Engineering
National Instruments
0 Kudos
Message 2 of 4
(3,596 Views)
It is almost, if not totally, impossible to calculate response times of an application running under Windows, since Windows is everything but a real time operating system. Even if you evaluate the response time empirically as you did these values will not be reliable with each and every environment.

Windows inherently is not very suitable for real time applications and calculating precise response times etc but sometimes there is no other choice.
0 Kudos
Message 3 of 4
(3,596 Views)
Here is the code for the main part of the program I am running:

flex_reset_pos(boardID,1,0,0,0xFF);
flex_load_velocity(boardID,1,1000,0xFF);
flex_load_target_pos(boardID, 1, 10000, 0xFF);
flex_blend(boardID, 1, 0);
Sleep(1);
for (i = 0; i < 2000; ++i)
{
flex_read_pos(boardID,1,0xFF);
flex_read_adc(boardID,0x51,0xFF);
flex_communicate(boardID, NIMC_READ_RDB, 3,
&resource1, &comm1,val,0xFF);
flex_communicate(boardID, NIMC_READ_RDB, 3,
&resource2, &comm2, &adcvalues[i],0xFF);
positions[i] = (val[0] << 16) + val[1];
if (i > 0)
{
if (positions[i] == positions[i-1])
break;
}
}

This program is the only program running on my system. There are no on-board programs running either. Any ideas on how I can get
data from the board quicker. Thanx.

--Firoz
0 Kudos
Message 4 of 4
(3,596 Views)