Jump to content
OMRON Forums

User Servo Rountine in Libraries Folder


Recommended Posts



I'm implementing a Custom User Servo Algorithm, that's been sucessful until now.

For modularity purposes, I'm trying to declare a function in a folder inside the "Libraries".


I declared my function "test" in "test.c" file, and in the "test.h" I made all the includes contained in usrcode.h

#ifdef __KERNEL__
#include <linux/module.h>
#define EXPORT_SYMBOL(x)
#define KERN_ALERT
#define printk printf
#include <gplib.h>
#include <RtGpShm.h>
#include <rtpmacapi.h>

double test(struct MotorData *Mptr);

I also included the path to "test.h" in the "usrcode.c"

#include "../Libraries/test/test.h"

The code is compiled sucessfully, but the function "test" doesn't appear in the User Servo Setup.



Am I missing something, or is it impossible to do what I'm thinking?

Thanks in advance.

  • Like 1
Link to comment
Share on other sites

Indeed, it's not possible to include the functions created in the "Libraries" folder.

The code is compiled, but the following errors appear in the Output during the download.


I also tried to create the header in the "Include" folder, and include the function from there, but the same erros occur.

I'm guessing that isn't possible to achieve what I was thinking in the beginning.

Edited by leandro.martins
Link to comment
Share on other sites

If the issue with header files in the includes folder was modularity, then it would still be possible to create some level of modularity by creating an include file that includes other includes files and using a helpful naming convention.

I've made a feature request with the software team for subfolders in the Include folder. I can't comment on whether it will be accepted.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...