Sotware feature request: GetOutputState API event

Moderator: cnckeith

Post Reply
grassmann
Posts: 4
Joined: Sun Nov 19, 2023 3:20 am
Acorn CNC Controller: No
Plasma CNC Controller: No
AcornSix CNC Controller: Yes
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 0008DC111213-0815230137
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Sotware feature request: GetOutputState API event

Post by grassmann »

Hopefully I'm not missing something in the API docs, but I do see a need for CncSkinning.Skinning.plc.GetOutputState to also include an event that is raised when the output state changes and the event args (OutputStateEventArgs) could contain the outputs and their states. If there is something like this already, I'm all ears.


Thank you kindly,
G


ASPeters
Posts: 46
Joined: Thu Feb 10, 2022 5:55 pm
Acorn CNC Controller: No
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Sotware feature request: GetOutputState API event

Post by ASPeters »

The API between an app and CNC12 is more of a one way street where the app has to request information from CNC12. If you are looking for changes in several outputs, I would recommend setting up a watchlist and checking if the states of the outputs match the previous state and act accordingly.

The calls for the watchlist are CentroidAPI.CNCPipe.plc.SetWatchlist and CentroidAPI.CNCPipe.plc.GetWatchlist.

Skinning was renamed to CentroidAPI and deprecated calls were removed in v5.10 but both versions still have the watchlist.


grassmann
Posts: 4
Joined: Sun Nov 19, 2023 3:20 am
Acorn CNC Controller: No
Plasma CNC Controller: No
AcornSix CNC Controller: Yes
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 0008DC111213-0815230137
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Sotware feature request: GetOutputState API event

Post by grassmann »

Thank you very much! I will change my approach.


Post Reply