New driver for board FDC4

Hello Jerome, I'm finishing my controller prototype and I would like build my own driver for Jedicut.

I'm programmer in several languajes (C++, Java, Phyton...) and Delphi not appear complicated but I'm wondering if you could help me a bit starting the IDE and Project.

I just checkout the source of drivers projects and install Delphi7, but I'm little lost about the project configuration... I'm trying to compile CncNet_XP but it just appear nothing.

Some one suggestion to set the IDE and start project?

Thanks in advanced.

PD. you can see the prototype here:

Re: New driver for board FDC4

Wooow, I just compile my first driver version!! after setup right the projects directories it's really easy (:D

[img] ... driver.png[/img]

I pretend customize the heat pin assignation and use a master-sincronous communication for the heat controller. The MCU firmware of the FDC4 heat controller is autonomous to handle the PWM for heat regulation without an continuos supervision from Jedicut.


Re: New driver for board FDC4

Hi Jerome, FDC4 is my own controller design for my (DIY) CNC foam cutter (

The controller use standard LPT sense+rotation bits for motors and hadle it in PWM current modulation at 42V in order to achieve maximun speed at fast movement.

The wire heat is controlled by a MCU and use embebed USART module to comunicate with PC via two pins. Just send the desired % of heat and the module set it selft the apropiate values in the PWM module to start/stop/regulate the heating. Althought the heat could be handle manually if desired.

The adaptation that I requiere is change the heat pin assigment and the protocol to send the %value trought it in serial mode.

Jerome, some one questions:

1) EmettreBit function, I undertand is called in an infinite loop... how is determined the frecuency/ratio of invocations? is a fixed ratio? or depend it the speed because is a reactor function called only when a motor forward?

2) InitialiserChauffeEtCommunication, I undertand is called just at start cut cicle... right?

3) In general, could you tell me a short description of event call function secuence?

Thanks in advanced Jerome.

PD. of course, the library will be shared ;-)

Re: New driver for board FDC4

Hi again Jerome, beta-1 of driver is available in:

I'm replaced the hardware dependend timming loop mechanisme for high-res counter and fix the pulses at 250useg.

Debugging I found the function EmettreBit is called for each motor pulse, and it's a surprise... following it algoritm, if each pulse delay 250uS*vitesse itselft.... the motor speed will be variable dependending of number of motors in action. I'm mistake?

Thanks in advanced.

Re: New driver for board FDC4


It's normal. Imagine you have 2 motors.

If motor A runs, you can step like "A A A A A"

if you run the 2 motors, Jedicut send step like : "A B A B A B"

I try two adapt the time between two steps in Jedicut beta version but It didn't work...

Do you want to share your code on Jedicut's google code project ?

Re: New driver for board FDC4

Hi Jerome, of course... give me a user for SVN and commit my code (or other way).

You'll find an improved procedure to delay in usec. using high performance counters.

The main problem at algorithm is the speed depend the number of motors on...I must setup the high speed at half, because if I move only a motor overspeed it and if are the four motors in movement the speed is a quarter.

The problem is EmetrreBit is called motor by motor and I have not concurrent information.

I was thinking to develop a Thread that mix motor bits handling into a queue bit at high resolution (40Khz for example) while EmetrreBit just put orders into the queue and inform the time it must "live" for each motor.

One question Jerome, what is the meaning of AdapterOrdres?... I show a ordenation of array bits but I can't resolve the intention without the context. (I'm looking for the place where split/lost the concurrent status of motors.

Thanks in advanced

Re: New driver for board FDC4

Jerome, I saw a else statement into the code like:

if vitesse < 0

I must debug a few more to be sure, but.... if you call EmetrreBit for couple motors always Xa+Xb (even if just a motor must forward) the secuence will be ABABAB or A_A_A (one motor). If vitesse signus is negative then just delay -(vitesse)*125us and the speed is constant independent of motor numbers on.

It's right this?

Re: New driver for board FDC4


You work very quickly and it's a pleasure to see the evolution of your project !

I never use usec and if it works fine, I will take a look at your technic to improve the others dll !

When you talk about "mix motor", it's exactly what I try but I don't succeed to find a good algorithm. You can try to do this in "AdapterOrdres" function. I use this method to adapt orders of motors depending of cnc board.

Jedicut call "AdapterOrdres" just before send all orders. First, Jedicut calculates all orders, and in second, Jedicut send all orders to the boards by calling "EmettreBit".

If vitesse signus is negative, all motors stop during few seconds (it depends on "pause" delay setting in the cycle of cut in Jedicut).

if you call EmetrreBit for couple motors the secuence will be (A+B)(A+B)(A+B) if the 2 pins of motors are connected to the same register of your parallel port.

To share you code, you have to create a google account, and send me by email (or PM) your email you use to create this account. After that I'll add you to the Jedicut-extension opensource project, and you will be able to commit your code with your favorite SVN client. The webpage of the project :

Do I answer all your questions ? Excuse me for my very bad english... :p :p