Hi,
In KMotion help, there is Virtual COM port Driver Installation. What functions does Virtual COM port have? Can I use it to communicate between a C# program on PC and KLOP board by UART? What do I have to do to use it?
Thank you,
TQH
Hi,
In KMotion help, there is Virtual COM port Driver Installation. What functions does Virtual COM port have? Can I use it to communicate between a C# program on PC and KLOP board by UART? What do I have to do to use it?
Thank you,
TQH
kure6592,
If you downloaded the latest version of the software, the install includes all of the source code plus example programs in VB/VC/VCS.
Fish
Hi, Fish
KFLOP - Motion Controller 4.XX properties in my computer doesn't have Advanced. So, I don't setup Virtual Com Port Driver.
Additionally, I have example programs in VB/VC/VCS but I don't have user guide documents.
Can you help me?
Thanks,
TQH
kure6592,
Maybe I am confused about what you need. K-Flop should connect via USB, are you not able to communicate with the K-Flop using K-Motion//K-MotionCNC with the K-Flop connected via USB? Is this your problem or are you trying to connect to the K-Flop from some program you are writing and need help with the source? I was assuming the latter, and honestly writing an interface for the K-Flop is not really in my wheelhouse, but if you are simply having problems connecting to the K-Flop via USB/K-Motion//K-MotionCNC then perhaps I can be of some assistance....
Fish
Hi, Fish
I communicated with the FLOP using KMotion connected via USB. Now, I want to program a C# software. A C# software is able to send data to KFLOP and receive data from KFLOP by UART protocol via USB of KFLOP board. Does USB of KFLOP board support this function?
In KMotion Help document, I see Virtual COM Port Driver Installation. What is the function of Virtual COM Port?
I opened the example VCS: SimpleFormsCS using Visual Studio Express 2013. This program didn't run and outputed: "A first chance exception of type 'KMotion_dotNet.DMException' occurred in KMotion_dotNet.dll. An unhandled exception of type 'KMotion_dotNet.DMException' occurred in KMotion_dotNet.dll".
I don't know why.
Thanks,
TQH
Hi TQH,
The Virtual COM Port Driver should only be used if you have some application that can only send commands to a COM port. If you are writing a C# program it is better to use our libraries and .NET interface to send commands through USB to KFLOP.
Our Examples are made for Visual Studio 2008 Standard Version. If you use that Version they should work as is. If you upgrade the Projects sometimes there are some issues. One common problem is that the Output file (.exe) is not placed into the proper directory with the other DLLS (<install>\KMotion\Release). If the Application can not find the required DLLs the result will be a DLL not found Exception. Check where the executable is being placed. In some cases to run debug configurations you must build the debug versions of the DLLs using the BuildAllLibs.sln solution. The Express Versions do not easily support Microsoft Foundation Classes used by our libraries. I believe a special Microsoft Download is available to permit this.
Regards
TK
http://dynomotion.com
Hi Tom,
Is a C# software able to send data to KFLOP and receive data from KFLOP or only send commands to KFLOP?
If I send two commands to KFLOP continuously, will first command run completely before second command runs, or second command run while first command is running.
Best regards,
TQH
Hi TQH,
Any Host Program in any language can both send and receive data from KFLOP.
I don't really understand the question. It depends on the commands you are sending. But in general all commands to KFLOP are nonblocking. Which means for example an axis "Move" command will only initiate the motion trajectory. This allows other operations to be initiated in parallel. If you wish to wait for the first Move to finish before the second command is initiated then you must poll KFLOP continuously with something like the "CheckDone" command to determine when it is complete before sending the second command.
HTH
Regards
TK
http://dynomotion.com
Hi Tom,
I have a C# program which sends console commands to KFLOP board. But I don't find examples about using console commands. I sent some commands to KFLOP board via console screen but motor didn't run. I used some commands such as: Move0=100; MoveRel0=100;.
Additional, when I pushed "Move" button in Step Response Screen, what command did I send similarly if I used console screen?
Best regards,
TQH
Hi TQH,
Sending those Console Move Commands should cause the axis to move if the axis is properly configured and enabled. The "Move" button on the Step Response Screen downloads all the Axis parameters on the Step Response, Config, and Filters Screens then enables the axis, then performs a Move (and back). You might watch this Flash Video.
You can configure the KFLOP Axis Parameters and Enable the Axis either through a number of Console Commands or using a number of statements in C Program. A C Program can be compiled and downloaded to KFLOP with one function call.
There is a PC Host C++ Example called SimpleConsole that configures an axis and performs a move. It was written for our older KMotion Board using Microstepper mode (like our SnapAmp drives Steppers) so would likely need to be modified for your motor/amplifier type.
See also the KMotion_dotNet Console example.
HTH
Regards
TK
http://dynomotion.com
I have read example "KMotion_dotNet Console" and I have a problem.
static void RunAxisExample()
{
var axis = _Controller.GetAxis(0, "X");
axis.Acceleration = 10000;
axis.TuningParams.Jerk = 10000;
axis.Velocity = 10000;
axis.Enable();
axis.CPU = 100;
axis.MoveTo(50);
axis.Jog(400);
axis.Stop();
axis.ZeroAxis();
}
I use mode Step Dir. I want to know number of pulses which IO8 (Step 0 output) outputs if I use one command axis.MoveTo(50) . Number of pulses = axis.CPU * axis.MoveTo(50) , is it right?
Additionally, Does KMotion_dotNet have a command like "pause"?. System stopped the current motion after pressing "pause" and continued to run if pressing "run".
Thanks.
Hi TQH,
MoveTo(50) would move to an absolute position of steps = axis.CPU * axis.MoveTo(50). So where you started from would determine how many step pulses would be generated.
Normally Feed Hold is used to pause/resume motion. But it doesn't seem to currently work with these Independent Axis Moves. We hope to solve that soon in a Test Release. You could stop the axis by issuing a Jog(0). Then to resume you would have Move again to the previously commanded target.
Regards
TK
http://dynomotion.com