How to turn od LED

More
16 Dec 2022 18:29 #259660 by kk893
Replied by kk893 on topic How to turn od LED

We don't know what you have done yet...

-Did you already install the Etherlab master?
-Is Ethercat working by the commandline tools?
-Did you install linuxcnc-ethercat?
-Which Linux / Linuxcnc?
-for EK1818 you will have to create your own pdo configuration with the use of the "generic" slave.

As I am reading from your first post, you are trying to controll the led with an C Programm and this is not CNC related, then you are here in the wrong place.
Look at IGH Etherlab for creating your own ethercat applications in C-Language
 

I got such an assignment. I don't know more details. I suspect that:
- etherlab is installed,
- linuxcnc-ethercat is installed.
I will deal with the CNC project later, but I was given a task to get familiar with it at the beginning. I know that I have to use a component to drive the LEDs. I found an example program using "component" and I suspect that my program should be built on a similar principle.
Here is an example code:
component rand;
option userspace;

pin out float out;
license "GPL"; // indicates GPL v2 or later
;;
#include <unistd.h>

void user_mainloop(void) {
while(1) {
usleep(1000);
FOR_ALL_INSTS() out = drand48();
}
}
 

Please Log in or Create an account to join the conversation.

Time to create page: 0.268 seconds
Powered by Kunena Forum