Jump to content
OMRON Forums

OpenMacro() function not working in Sept2011 IDE


KEJR
 Share

Recommended Posts

Hello,

 

I have a project that compiles and works in the Feb 2011 IDE/Firmware but after installing the Sept 2011 firmware I get the following:

 


PMAC variables are mapped successfully.
	Build Process For XYOilerMain.out has started.
U:\QA Power PMAC Project\XYOilerCode\C Language\Background Programs\XYOilerMain\xyoilermain.c(670,0): Error :  'OpenMacro' was not declared in this scope
	Build Process For XYOilerMain.out has ended.

 

Any ideas? As you can see in the output the project is a background C app.

 

KEJR

 

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Hi KEJR,

 

Can you check the gplib.h and see if there a OpenMacro() API available? These are the only ones I found:

 

MacroStationOpen(int fd, int station, int ring);

MacroStationClose(int fd, int ring);

MacroStationGetResponseAck(int fd, int station, int ring, unsigned char *sendstr, unsigned char *rcvstr, int maxrcvstr);

MacroRingOrderClrf(int fd, int ring);

MacroRingOrderInit(int mfd, int station, int ring);

MacroRingOrderDetect(int mfd, int stn, unsigned char *outbuf, FILE *mrofp, int ring);

MacroRingOrderVerify(int mfd, int stn, unsigned char *errbuf, int ring);

MacroRingOrderLoad(unsigned char *outbuf, int ring);

MacroRingOrderErrors(int mfd, int stn, unsigned char *outbuf, int ring);

MacroOpenMroFile(int ring, const char * mode);

MacroRingOrderBrdcstAsciiCmd(int fd, int ring, unsigned char *pstr);

MacroRingOrderBackup(int mfd, int stn, unsigned char *outbuf, int ring);

MacroRingOrderRestore(int mfd, int stn, unsigned char *outbuf, int ring);

MacroRingOrderStatus(int mfd, int stn, unsigned char *outbuf, int ring, unsigned char EchoMode);

MacroStationWrite(int fd, int station, int ring, unsigned char *pstr);

MacroStationRead(int fd, int station, int ring, unsigned char *pstr);

SetAllMacroStationsMaxPhase(int mfd, double freq)

 

 

Link to comment
Share on other sites

Can you check the gplib.h and see if there a OpenMacro() API available? These are the only ones I found:

 

Neither MacroOpen() or OpenMacro() can be found in gplib.h. I think I remember one of the C programmers over there (Ed Lay??) saying that they were going to rename this function in the next release to be consistent with the naming scheme to MacroOpen(). It is not present in this header, however. I do see a OpenMacro() in rtpmacapi.h, but I am getting problems when I include this file in addition to gplib.h, almost as if the two headers are mutually exclusive.

 

Adding an extern function prototype for either function name simply moves the problem from the compiler to the linker, so the function must not exist in the object file I'm thinking.

 

It should be noted that I am not doing anything involved with the OpenMacro() as I am just calling these functions later on in the code and OpenMacro() was needed at the time to get this to work:

 

PmacCmd("MacroSlave0,i1145=0"); //Set Positive limit on axis 1 to no function (disable)
PmacCmd("MacroSlave1,i1146=0"); //Set Negative limit on axis 2 to no function (disable)

 

If this is no longer needed I'd be more than happy to get rid of it. I don't have access to the machine with the Macro drives on it now or I'd just try it.

 

Any ideas?

Thanks,

 

KEJR

 

Link to comment
Share on other sites

I think I found the problem. gplib.h just needs to have the following added to it:

 

extern int MacroPortOpen( char Mode, unsigned MaxTimeout);

 

I found reference to this in rtpmacapi.h and it just wasn't listed in gplib.h. I'm not sure why I didn't see this before, but after the fact it was obvious.

 

I changed the name where it was used in my code, of course.

 

I don't have access to the machine at the moment so I can't test it, but I'm sure this was the issue.

 

Should I file a bug with bugzilla, or will this be passed on?

 

Thanks,

KEJR

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share


×
×
  • Create New...