Search found 91 matches
- Sat Dec 14, 2024 1:50 pm
- Forum: Centroid CNC12 APi Discussions
- Topic: Remotely trigger jobs using the API?
- Replies: 32
- Views: 46119
Re: Remotely trigger jobs using the API?
Alternatively, you can use a similar approach and use RunCommand to set the system variables to the value if you need to change other WCS locations.
WCS Vars.png
cncJob.RunCommand("#2501 = 1.72; WCS #1 X val set to 1.72", GetCNC12WorkingDirectory(), false)
I went for this, it was clean ...
This post has been liked 0 time(s).
- Thu Dec 12, 2024 1:41 pm
- Forum: Centroid CNC12 APi Discussions
- Topic: Remotely trigger jobs using the API?
- Replies: 32
- Views: 46119
Re: Remotely trigger jobs using the API?
In the API, is there an equivalent to setting a part position with a numerical input?
Screenshot 2024-12-12 at 18.36.56.png
I have an ultrasonic sensor that will detect X distance to the part along the track. So for each job segment, I will have an updated distance measurement in X (e.g. + 1.72 ...
Screenshot 2024-12-12 at 18.36.56.png
I have an ultrasonic sensor that will detect X distance to the part along the track. So for each job segment, I will have an updated distance measurement in X (e.g. + 1.72 ...
This post has been liked 0 time(s).
- Thu Dec 12, 2024 1:35 pm
- Forum: Centroid CNC12 APi Discussions
- Topic: Remotely trigger jobs using the API?
- Replies: 32
- Views: 46119
Re: Remotely trigger jobs using the API?
I can confirm the new DLL fixed this. Thanks for the quick response!Centroid_Jacob wrote: ↑Wed Dec 11, 2024 2:11 pm We have a test DLL to send you that should fix the bug with "SetWorkpieceOrigin (int wcs, int axis )", you should get an email shortly containing the new DLL and instructions.
This post has been liked 0 time(s).
- Wed Dec 11, 2024 1:18 pm
- Forum: Centroid CNC12 APi Discussions
- Topic: Remotely trigger jobs using the API?
- Replies: 32
- Views: 46119
Re: Remotely trigger jobs using the API?
This is a bug, thanks for bringing this to our attention.
Ok, happy to know it's a bug, and not my mistake. Thanks for confirming.
CentroidAPI.CNCPipe.Wcs.GetActiveWcs , the output is expected to be a number between 1-18, but I get a 0.
GetActiveWCS returns 0 indexed selected WCS, so if ...
This post has been liked 0 time(s).
- Tue Dec 10, 2024 8:28 pm
- Forum: Centroid CNC12 APi Discussions
- Topic: Remotely trigger jobs using the API?
- Replies: 32
- Views: 46119
Re: Remotely trigger jobs using the API?
This is coming together really well, and I have now completed most of what I needed. I can select a job, set It to run, and monitor it as it runs, check for error messages, and verify that it successfully completed.
(This --> is NOT how I intend to use the API, but I added some of the fields to a ...
(This --> is NOT how I intend to use the API, but I added some of the fields to a ...
This post has been liked 0 time(s).
- Mon Dec 09, 2024 4:23 pm
- Forum: Centroid CNC12 APi Discussions
- Topic: Remotely trigger jobs using the API?
- Replies: 32
- Views: 46119
Re: Remotely trigger jobs using the API?
Yep, It would seem the lookahead function is evaluating those variable before we actually get to the line of G-Code, you should modify your job as such to avoid this:
; ICN_PATH = C:\intercon\API_test_file.icn
; --- Header ---
N0001 ; CNC code generated by Intercon v5.22
; Description: API Test ...
This post has been liked 0 time(s).
- Mon Dec 09, 2024 3:26 pm
- Forum: Centroid CNC12 APi Discussions
- Topic: Remotely trigger jobs using the API?
- Replies: 32
- Views: 46119
Re: Remotely trigger jobs using the API?
I copied your GetSystemVariable C# code into my project and ran it without issue here. Tested with Offline 5.22 and Regular 5.22 and I always see the value as long as the Pipe is not broken. Did the same after converting to VB, no issues, always returns the value set by MDI as long as pipe is ...
This post has been liked 0 time(s).
- Mon Dec 09, 2024 11:50 am
- Forum: Centroid CNC12 APi Discussions
- Topic: Remotely trigger jobs using the API?
- Replies: 32
- Views: 46119
Re: Remotely trigger jobs using the API?
Tested it here, no issues for me when retrieving #29110 other than when restarting the software to clear the value for more testing. The Pipe goes down and needs to be reinitialized or the "cncJob.GetSystemVariable(variableNumber, out double value)" will return Broken Pipe instead of success and ...
This post has been liked 0 time(s).
- Mon Dec 09, 2024 10:02 am
- Forum: Centroid CNC12 APi Discussions
- Topic: Remotely trigger jobs using the API?
- Replies: 32
- Views: 46119
Re: Remotely trigger jobs using the API?
I have tried to implement this, but not sure why I am always getting 0 as a result when checking the variable.
Does the system variable still exist after the job has successfully finished? Or is it only populated in the context of when a job is actively running?
For example, I can display the ...
This post has been liked 0 time(s).
- Mon Dec 09, 2024 8:50 am
- Forum: Centroid CNC12 APi Discussions
- Topic: Remotely trigger jobs using the API?
- Replies: 32
- Views: 46119
Re: Remotely trigger jobs using the API?
You can watch if a job is active using a new instance of the CentroidAPI.CNCPipe.Plc class. PLC.GetPcSystemVariableBit(CentroidAPI.PcToMpuSysVarBit.SV_JOB_IN_PROGRESS, plcState) and then when the job in progress returns false, check a system variable that you defined at the start of your job, ex ...
This post has been liked 0 time(s).