tions for this program in lab windows cvi using field point explorer.I tried to define my functions in at the top of my program on use them in the calls in the main. I have looked at the examples, but I am having trouble trying following the same process.I am trying to make a program that will send a signal my analog output module to release a certain amount of amps.I am using the FP-1000 with the FP-AO-200. When running the program I get one error ten that is focused on one line. The error that the intializer must be constant. I don�t understand want this error means. Below are the problem areas of my Program. I thankful for any help you can offer me.
/*====================*=INCLUDE FILE=*=================================*/
#include
#include
#include
#include
#include "FieldPoint.h" /*Needed to link with field point explorer*/
#include
#include /* Needed to link to an external compiler*/
#include
#include "FPAO.h" /*Needed to link with the FP_AO_200 (Analog Output Module)*/
#define BUFFER_SIZE 256
#define POINTS 8
/*======================================================================*/
/*=======================*Functions&Variables*==========================*/
static IAHandle IO_handle;
static IAHandle FP_handle;
static char module[BUFFER_SIZE];
static IAByte value[BUFFER_SIZE];
static IAByte current_read[BUFFER_SIZE]; // Buffer for read value
void Error(IAStatus);
/*======================================================================*/
/*========================*=FUNCTIONS=*=================================*/
/*============================Main======================================
This function does the following:
a. Minimal initialization
*/
int main (int argc, char *argv[])
{
if (InitCVIRTE (0, argv, 0) == 0) /* Needed to link to an external compiler*/
return -1; /* out of memory */
else
return 0;
}
/*======================================================================*/
/*=====================Initialize Functions=============================*/
/*This function does the following:
a. intializes the instrument
b. reset the instrument to know state
c. sends intial commands to instrument
d. returns the instrument driver
e. sets instrument in default mode
f. performs identification query on instrument
*/
/*Opens the connection with field point*/
IAStatus FP_Open (IAString configFilePath,IAHandle* FP_handle);
// Open the server
status = FP_Open (NULL, &FP_handle)
// Get handle to "Channel 0" item
status = FP_CreateTagIOPoint (FP_handle, "FP Res", module, "Channel 0",
&IO_handle))
// Initialize the write controls
status = FP_Read (FP_handle, IO_handle, current_read, BUFFER_SIZE, �tamp);
.......................steps
/*==========================Close Functions=============================*/
/*This function does the following:
a.Takes the instrument offline and quits program
*/
IAStatus status = IA_SUCCESS;
//Stop timer callbacks
SuspendTimerCallbacks();
//Destroy the "All" item handle
status = FP_DestroyIOPoint (FP_handle, IO_handle);
//Close the server
status = FP_Close (FP_handle);
/*=============================*===MAIN===*=============================*/
int main()
{
//The Declare variables to be used in the program
int icycles,iyn,k;
float fmA, fopen;
//State the time and date
time_t now;
time(&now);
printf("It's %.24.0s.\n", ctime(&now));
//Initializing the Instrument
FP_Open();