Jump to content
OMRON Forums

CfromScript() - Calling from a C Background-Programs


sbrun
 Share

Recommended Posts

I have CfromScript functions which work very well when i call them from Script or from Kinematic.

I try to call those functions from a C Background-Program (C-app application).

I get errors in the Compilation.

 

I put in my c-App code :

#include "../../Realtime Routines/usrcode.h"

double cr;

cr = CfromScript(1,0,0,0,0,0,0); // for test

or

cr = CfromScript(1,0,0,0,0,0,0,NULL);

 

and in usrcode.h there is at the moment:

#ifdef __KERNEL__

#include

#else

#define EXPORT_SYMBOL(x) // x

#define KERN_ALERT

#define printk printf

#endif

#include // Global Rt/Gp Externals and structures

#include

double CfromScript(double arg1,double arg2,double arg3,double arg4,double arg5,double arg6,double arg7,LocalData *Ldata);

EXPORT_SYMBOL(CfromScript);

 

 

What is the correct call for declaring a call for CfromSript in C code ?

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Sbrun,

 

Are you including the usercode.h with proper path in your background C program?

 

Yes Sina, as show above : #include "../../Realtime Routines/usrcode.h" ,

and with only this include (and no call to CfromScript) i have no build error.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share


×
×
  • Create New...