Brad,
I tried using the command "UserAlgo.BgCplc[0] = 0" from within my background CPLC to kill itself after running only once. However I get compiler errors:
Error 1 'UserAlgo' undeclared (first use in this function)
I'm assuming that I need to include a .h file, but which one? Here's my code:
#include
#include
#include
//#include //Not sure if this was needed saw it in an example so I tried it, didn't fix UserAlgo problem
//-------------------------------------------------------------
// The following is a projpp created file from the User defines
//-------------------------------------------------------------
#include "../../Include/pp_proj.h"
#include "../../Include/fswmain.h"
void user_plcc()
{
char *tempstr;
sprintf(tempstr, "This is the sprintf in the bgplc");
Send(SEND1_PORT,tempstr);
stmach_hmi1statusupdate();
sprintf(tempstr, "This is the sprintf after the state machine call");
Send(SEND1_PORT,tempstr);
UserAlgo.BgCplc[0] = 0; // only run once
}