Search found 226 matches
- Mon Dec 28, 2020 11:59 pm
- Forum: User PC Applications and Libraries .Net
- Topic: G-codes/offsets/tools with .Net
- Replies: 120
- Views: 19001
Re: G-codes/offsets/tools with .Net
I'm gradually working my way through the list of KFlop to PC commands, and can see my next stumbling block. How do I retrieve strings from the gather buffer? I've found the function in KMotionCNC that achieves this, but I'm not sure how you'd handle this via dotNet, as I can't find anything in the d...
- Mon Dec 28, 2020 5:17 pm
- Forum: User PC Applications and Libraries .Net
- Topic: G-codes/offsets/tools with .Net
- Replies: 120
- Views: 19001
Re: G-codes/offsets/tools with .Net
Thanks for that Tom. That worked well, and I've wrapped it up into the following function for anybody dealing with this- private double GetPC_commFloat(int idx) // This gets a Float value from the bulk status, and outputs it as a double (avoids the comm/time penalty of using KM.GetUserDataFloat { By...
- Mon Dec 28, 2020 1:57 pm
- Forum: Configuration Issues
- Topic: C program control issues
- Replies: 18
- Views: 747
Re: C program control issues
The first issue I'm having is that the Halt button does not stop the program. The only (nice) way I've found to do that is to click on the ticked Enable box. This removes the tick and the Dest display stops counting, so I presume that is stopping it? The halt button only stops that program thread f...
- Sun Dec 27, 2020 10:36 pm
- Forum: User PC Applications and Libraries .Net
- Topic: G-codes/offsets/tools with .Net
- Replies: 120
- Views: 19001
Re: G-codes/offsets/tools with .Net
Tom, just to check how I'm reading the variables attached to MS.GetPC_comm() calls. I know the variables can be accessed by increasing the index as required, but in the case of floats after a PCDoFloat() call, that results in the wrong value being read, GetPC_comm only returns ints. Is using GetUser...
- Sun Dec 27, 2020 12:09 pm
- Forum: User PC Applications and Libraries .Net
- Topic: G-codes/offsets/tools with .Net
- Replies: 120
- Views: 19001
Re: G-codes/offsets/tools with .Net
So I'm assuming I need to add a test, and abort if GetStatus returns 1, in a similar way to KMotionCNC? Well, no. GetStatus doesn't return an error code. Rather it throws an exception. I was looking at https://dynomotion.com/KMotion_dotNet/Docs/Help/html/M_KMotion_dotNet_KM_MainStatus_GetStatus.htm...
- Sun Dec 27, 2020 12:00 pm
- Forum: User PC Applications and Libraries .Net
- Topic: Handling G30 in KMotionCNC and Probe signal?
- Replies: 14
- Views: 2352
Re: Handling G30 in KMotionCNC and Probe signal?
DefineCoordSystem, is what tells the interpreter what channels to output motion. It requires channels XYZA to be declared. Any channels you're not using, set to -1. What I suspect you need to use is DefineCoordSystem(0,1,2,-1), assuming X is on channel 0, Y channel 1, and Z channel 2. By setting A a...
- Sat Dec 26, 2020 11:50 pm
- Forum: User PC Applications and Libraries .Net
- Topic: G-codes/offsets/tools with .Net
- Replies: 120
- Views: 19001
Re: G-codes/offsets/tools with .Net
Thanks for that Tom. I'm sure I've looked at that example program in the past, but I used the SimpleGCodeWPF as the base for this. Turns out I already use GetStatus, but hadn't actually realised the names were the same. To show my full code - if (Connected && KM.WaitToken(100) == KMOTION_TOKEN.KMOTI...
- Sat Dec 26, 2020 10:19 pm
- Forum: User PC Applications and Libraries .Net
- Topic: G-codes/offsets/tools with .Net
- Replies: 120
- Views: 19001
Re: G-codes/offsets/tools with .Net
I may have to dig into the interpreter :/ I can handle populating the interpreter tool/offsets in suitable units when via my app, but the problem is if the running g-code switches G20/21, then I have no way of controlling what the interpreter does. The easiest 'bodge' I can think would be to pre-sca...
- Sat Dec 26, 2020 7:33 pm
- Forum: User PC Applications and Libraries .Net
- Topic: G-codes/offsets/tools with .Net
- Replies: 120
- Views: 19001
Re: G-codes/offsets/tools with .Net
Actually, having done a bit more testing, the same problem does partially apply to offsets. I thought when the interpreter changed between inch/mm, the already stored offsets got updated? When you switch between inch/mm, the existing offset updates as expected, but if you then reload that offset, th...
- Sat Dec 26, 2020 7:24 pm
- Forum: User PC Applications and Libraries .Net
- Topic: G-codes/offsets/tools with .Net
- Replies: 120
- Views: 19001
Re: G-codes/offsets/tools with .Net
:D Tom, I'm just working through testing the my whole mm/inch mode, as I knew there were some aspects I hadn't got fully converting when needed. The big issue I've noticed just now, is tool offsets don't get converted when the interpreter switches between mm/inch. I.e. I load a tool in mm with an of...