Monday, April 6, 2009

Interface for the Record of the Trajectory

User Interface

This second code is the interface code. On it, the user can predefined the trajectory and send the signal to the microcontroller so it can play it. This program is made in LabWindows CVI.

Code

#include "Trayectoria.h"

static int panelHandle;

int SendAsciiString (int comport, char *send_ASCII);
int GetSerialMessage (int comport, char *readdata);

char readBuffer[256];

int main (int argc, char *argv[])
{
if (InitCVIRTE (0, argv, 0) == 0)
return -1; /* out of memory */
if ((panelHandle = LoadPanel (0, "Trayectoria.uir", PANEL)) <
loopexit =" 0;" x="0;" error =" -1;" x="0;" begin =" Timer();"
seconds =" 0.003;" inbuffer =" GetInQLen"> 2) {
ComRd (comport, readdata, InBuffer);
LoopExit = 1;
error = 0;
break;
}
SyncWait (Begin, Seconds);
}
if (x == 500)
break;
} while (LoopExit == 0);
return error;
}

No comments:

Post a Comment