Page 1 of 1
Kflop Input
Posted: Fri Jun 22, 2018 5:44 am
by magno_grail
I am looking through the code of KmotionX-master to see what the input data is to the Kflop board. Apparently all the G-code interpreter and motion trajectory calculations are done on the PC, correct?
The DSP_KFLOP and DSP_KMotion PC2.c files list the commands available. Presumably I can write my own program to send these commands to the Kflop board?
Does the Kflop have to be flashed at every boot or does it retain the last image?
My brush servo boards use PWM for speed, digital for direction, shutdown and outputs fault through optical couplers. Can the Kflop board I/O be configured to handle this?
The reason for doing this is to replace the existing custom computer (20MHz 68020) with a modern SoC such as a BeagleBone Black and use that to drive the Kflop. The machine already has a keypad input which is not compatible with a PC. The screen is a monochrome graphics 80 column by 25 character CRT which will be replaced by an LCD screen with HDMI input.
Thanks.
Re: Kflop Input
Posted: Fri Jun 22, 2018 8:32 pm
by TomKerekes
Hi magno_grail,
I am looking through the code of KmotionX-master to see what the input data is to the Kflop board. Apparently all the G-code interpreter and motion trajectory calculations are done on the PC, correct?
Correct.
The DSP_KFLOP and DSP_KMotion PC2.c files list the commands available. Presumably I can write my own program to send these commands to the Kflop board?
No. Those define commands and variables that are available from C Programs within KFLOP. Not commands sent to KFLOP.
Script Commands are what are sent to KFLOP and often have similar functionality where it makes sense. See
Script Commands Here.
But it is better to use our KMotion PC Motion Libraries that will operate on a much higher level and handle all the communication to KFLOP. This diagram may help:
Does the Kflop have to be flashed at every boot or does it retain the last image?
KFlop does not retain anything after reboot. Although it is possible to Flash things into KFLOP we don't recommend it. If you have a PC it is better to simply have your PC Application configure and load anything into KFLOP when it is needed.
My brush servo boards use PWM for speed, digital for direction, shutdown and outputs fault through optical couplers. Can the Kflop board I/O be configured to handle this?
It should be possible. KFLOP has eight 3.3V PWM Outputs.
See the
Functional Diagram here. KFLOP doesn't support PWM directly as an Output Mode. The Output mode can be set to "None" and you can write the Output to the PWMs in whatever format your amplifiers require.
See here for more info.
The reason for doing this is to replace the existing custom computer (20MHz 68020)
I programmed that processor for many years ~0.0002 GFLOP
HTH
Re: Kflop Input
Posted: Sat Jun 23, 2018 1:03 am
by magno_grail
Kmotion will not work directly for this application, none of the screens are applicable (80 column x 25 row MGA but will change to HDMI driven LCD), all the parameters are in a list which have to be the same as the existing program.
Windoz - a problem. I cannot have blue screens occurring which is why I need to rewrite the higher level program sans operating system. The user never has to check E-mail, play music or print documents, just run the mill.
The servo PWM input does not control the H-bridge directly. It controls the PAL chip that controls the output drivers. I think what your document refers to as recirculating(?) PWM but there is no negative output and a separate signal controls direction.
No problem converting the Kflop I/O to 3.3 volts. All the existing I/O is 5 volts but a custom interface board is needed anyway. My encoders are EIA-422 output and would need a differential receiver to connect with Kflop. The relay drivers are SN75468 which should work with the 3.3 volt outputs.
The configuration files can be stored on a micro-SD card and loaded at power-up.
Are the expanded Commands listed on:
http://dynomotion.com/Help/CmdsCategory.htm
available for download?
Re: Kflop Input
Posted: Mon Jun 25, 2018 8:13 am
by TomKerekes
Hi magno_grail,
I don’t really understand the question. Why would you want to download the command list?
Re: Kflop Input
Posted: Mon Jun 25, 2018 3:43 pm
by magno_grail
I wanted to see what needs to be written to the Kflop board for the real time motion. I was able to copy-paste the commands into Wordpad.
I can see for setup the Kmotion screens will be useful but for running the mill the interface need to be written to emulate the existing program.
Re: Kflop Input
Posted: Tue Jun 26, 2018 3:22 am
by greg9504
Kmotion will not work directly for this application, none of the screens are applicable (80 column x 25 row MGA but will change to HDMI driven LCD)
You could configure a windows machine to boot up and run your app without looking like a "windows machine". Or as you already found there is KmotionX for Linux, which it looks like have a 1:1 pairing to the Windows API's, although I have no experience using KmotionX. The libraries that Dynomotion provide are very comprehensive and make building a custom app very easy. You can design your app to look like whatever you want. Kmotion and KmotionCNC are there to get you started quickly and for most are all that is needed. Especially now with the KmotionCNC screen editor. But again, if you want something more customized just use the API to build what you want, everything is there and well thought out. However you will be miles ahead if you use Kmotion and KmotionCNC to get started and verify the machine is working like you want. Then build your custom app. You might want to look at adding KAnalog too, among other things it has differential inputs.
Re: Kflop Input
Posted: Tue Jun 26, 2018 5:18 am
by magno_grail
Thanks, I found KmotionX and the Github. I will see if I can load it onto my BeagleBone board. They have an installation for the Raspberry Pi which might be similar.
I will need a custom interface board to connect everything together as I want to keep the existing output board and all the I/O connectors. At the moment the machine uses a daughter board for the differential to ttl receivers for the encoders but these can be built onto the interface board. It is only a couple chips and resistors.