Page 1 of 1

Integrating KFLOP with a relay

Posted: Thu May 02, 2019 6:48 pm
by sagarm
Hi Tom,

I am using the KFLOP board with 2 Kstep boards to control a concrete 3D printer. Everything works great!
Now that everything works, I am trying to add a ball valve to shut on/off the flow of concrete (with the help of a relay). How do I use the I/O on the KFLOP to do this ?

1) I don't know which port to use : JP4 or JP6 or JP2

2) how do I intialize or set up the c program to set the appropriate pin (on JP4/JP6) as output.

3) Can I create my own custom G-code (M) or use an existing one, to turn the output pin on/off in my G-code program

I will be highly obliged if you can help me out here and send me your suggestions or a solution that can do this for us.
Really appreciate your help on this!

Thank you.

Best,
Sagar

Re: Integrating KFLOP with a relay

Posted: Thu May 02, 2019 7:20 pm
by TomKerekes
Hi Segar,

Since you have a KStep it would be better to use one of the two KStep optically isolated outputs. The KStep connected with the ribbon cable to KFLOP JP7 will have the functional IO.

See the Relay Driver Outputs section here.

These are driven by KFLOP IO Bits 0 and 1. Use SetBitDirection(0,1); to set Bit 0 as an output.

In KMotionCNC configure an MCode such as M3 to turn on the bit and one MCode such as M5 to turn off the bit.