Integrating KFLOP with a relay

Moderators: TomKerekes, dynomotion

Post Reply
sagarm
Posts: 6
Joined: Thu Feb 07, 2019 3:05 pm

Integrating KFLOP with a relay

Post by sagarm » Thu May 02, 2019 6:48 pm

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

User avatar
TomKerekes
Posts: 2676
Joined: Mon Dec 04, 2017 1:49 am

Re: Integrating KFLOP with a relay

Post by TomKerekes » Thu May 02, 2019 7:20 pm

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.
Regards,

Tom Kerekes
Dynomotion, Inc.

Post Reply