Search found 191 matches

by Moray
Tue Mar 17, 2020 7:58 pm
Forum: User PC Applications and Libraries .Net
Topic: G-codes/offsets/tools with .Net
Replies: 82
Views: 9448

Re: G-codes/offsets/tools with .Net

Debugging in VS is something I'm horrendous at. I'll have to go and do some reading up on that. However, I have tried moving the code around, and I've discovered if I do an MDI before the KFlop has connected, movement is locked out. But if I move the MDI to a point in the code where the KFlop has co...
by Moray
Mon Mar 16, 2020 10:23 pm
Forum: User PC Applications and Libraries .Net
Topic: G-codes/offsets/tools with .Net
Replies: 82
Views: 9448

Re: G-codes/offsets/tools with .Net

Thanks for that. Turns out I'm an idiot :roll: However, to answer your questions, I've got two labels set up to monitor X_OriginOffset, and X_AxisOffset. It was the X_AxisOffset that was showing the random value. I have however hit my next snag. Having added DoGCodeLine to change the interpreter dis...
by Moray
Mon Mar 16, 2020 7:53 pm
Forum: User PC Applications and Libraries .Net
Topic: G-codes/offsets/tools with .Net
Replies: 82
Views: 9448

Re: G-codes/offsets/tools with .Net

I am getting frustrated with this now. I am now calling InitializeInterpreter, just after the main KM_Controller is created, I then transfer my offsets using SetOrigin, then using ChangeFixture to select the active offset, the active offset is now updating as expected, with the expected value. Howev...
by Moray
Mon Mar 16, 2020 4:42 pm
Forum: User PC Applications and Libraries .Net
Topic: G-codes/offsets/tools with .Net
Replies: 82
Views: 9448

Re: G-codes/offsets/tools with .Net

Thanks for that Tom, I'll try it later. There is one thing I'm curious about, is at what point does the interpreter get initialised? In my code I transfer the offsets once my program loads, but then they are getting overwritten by the var file once I try running GCode. Should I call the InitializeIn...
by Moray
Sun Mar 15, 2020 11:19 pm
Forum: User PC Applications and Libraries .Net
Topic: G-codes/offsets/tools with .Net
Replies: 82
Views: 9448

Re: G-codes/offsets/tools with .Net

That makes sense. I've spent two nights chasing this problem, and it was only tonight I thought about checking KMotionCNC, and you are correct, I don't have a vars file specified. I'm not specifying any files in the interpreter, so I'm assuming it's using default.set, as it does have units set to de...
by Moray
Sun Mar 15, 2020 9:06 pm
Forum: User PC Applications and Libraries .Net
Topic: G-codes/offsets/tools with .Net
Replies: 82
Views: 9448

Re: G-codes/offsets/tools with .Net

Tom, I seem to have hit a problem with random offsets and my program jumping to G21 mode, and I'm struggling to understand what is causing it. Even removing all code that sets offsets, and the problem still exists. Starting with the KFlop rebooted, I run my program, and I've added code to print out ...
by Moray
Fri Mar 13, 2020 10:29 pm
Forum: User PC Applications and Libraries .Net
Topic: G-codes/offsets/tools with .Net
Replies: 82
Views: 9448

Re: G-codes/offsets/tools with .Net

Thanks for that Demonder. At the moment, I'm trying to replicate the KMotionCNC functionality, so I'm using a combobox to select/show offsets. What I'm finding the most difficult, is finding the required functions, and is something I keep meaning to mention. Tom, one issue I have, is although I can ...
by Moray
Thu Mar 12, 2020 10:29 pm
Forum: User PC Applications and Libraries .Net
Topic: G-codes/offsets/tools with .Net
Replies: 82
Views: 9448

Re: G-codes/offsets/tools with .Net

Interesting approach Demondor. I've opted for using the .Net axis approach, but I'm guessing both approaches achieve the same outcome. I've just finished testing all my jog buttons, and I'm happy to report after a brief bit head scratching, adding a missing "-", and realising I still had my Z counts...
by Moray
Mon Mar 09, 2020 10:30 pm
Forum: User PC Applications and Libraries .Net
Topic: G-codes/offsets/tools with .Net
Replies: 82
Views: 9448

Re: G-codes/offsets/tools with .Net

so for now I'm looking at using the KM_axis MoveTo() or RelativeMoveTo() to implement step jogging. I see it's noted that it blocks the commanding thread, so I'll need to trigger it via another thread to avoid lock ups, but can a MoveTo be stopped by then issuing a Halt via the main/another thread?...
by Moray
Wed Jan 08, 2020 9:15 pm
Forum: User PC Applications and Libraries .Net
Topic: G-codes/offsets/tools with .Net
Replies: 82
Views: 9448

Re: G-codes/offsets/tools with .Net

TomKerekes wrote:
Wed Jan 08, 2020 1:52 am
Maybe in C# you are using the Button Changed event or something instead of Clicked Event to execute the DoGCodeLine()?
It's the seemingly simple things that cause the problems!
You are correct, I was using the Checked event. Swapping to the Click event has solved the problem.