@droftarts
I have the example running and I'm watching the stream. I have set it to intercept "everything" (removed filters from the InterceptConnection call).
With the example program NOT running, if I execute an G90 G1 X-10 F6000 while X is at 0mm from the DWC Dashboard tab, I get "Error G1: target position outside machine limits" banner message and it goes to the Console. All correct as my X limit is -1mm.
With the example program running, if I execute an G90 G1 X-10 F6000 while X is at 0mm from the DWC Dashboard tab, The "Error G1: target position outside machine limits" banner message does NOT display in DWC nor in the Console, and the example app receives the following:
pi@A1000-0:~/A1000 $ python intercept.py
send: {"mode":"Intercept","version":12,"InterceptionMode":"Pre","Channels":["HTTP","Telnet","File","USB","Aux","Trigger","Queue","LCD","SBC","Daemon","Aux2","Autopause","File2","Queue2","Unknown"],"AutoFlush":true,"AutoEvaluateExpressions":true,"Filters":null,"PriorityCodes":false}
recv: {"success":true}
recv: {"sourceConnection":0,"result":null,"type":"M","channel":"Trigger","lineNumber":null,"indent":0,"keyword":0,"keywordArgument":null,"majorNumber":409,"minorNumber":null,"flags":4097,"comment":null,"filePosition":null,"length":null,"parameters":[{"letter":"K","value":"network","isString":true},{"letter":"I","value":"1","isString":false}],"command":"Code"}
1 CDE:
M409 K"network" I1
1 CDE Type:
M
send: {"command":"Flush","Channel":"Trigger","SyncFileStreams":false,"IfExecuting":true}
recv: {"result":true,"success":true}
send: {"command":"Resolve","Type":0,"Content":null}
recv: {"sourceConnection":43,"result":null,"type":"M","channel":"HTTP","lineNumber":1,"indent":0,"keyword":0,"keywordArgument":null,"majorNumber":120,"minorNumber":null,"flags":2049,"comment":null,"filePosition":0,"length":5,"parameters":[],"command":"Code"}
2 CDE:
M120
2 CDE Type:
M
send: {"command":"Flush","Channel":"HTTP","SyncFileStreams":false,"IfExecuting":true}
recv: {"result":true,"success":true}
send: {"command":"Resolve","Type":0,"Content":null}
recv: {"sourceConnection":43,"result":null,"type":"G","channel":"HTTP","lineNumber":2,"indent":0,"keyword":0,"keywordArgument":null,"majorNumber":91,"minorNumber":null,"flags":2049,"comment":null,"filePosition":5,"length":4,"parameters":[],"command":"Code"}
3 CDE:
G91
3 CDE Type:
G
send: {"command":"Flush","Channel":"HTTP","SyncFileStreams":false,"IfExecuting":true}
recv: {"result":true,"success":true}
send: {"command":"Resolve","Type":0,"Content":null}
recv: {"sourceConnection":43,"result":null,"type":"G","channel":"HTTP","lineNumber":3,"indent":0,"keyword":0,"keywordArgument":null,"majorNumber":1,"minorNumber":null,"flags":2049,"comment":null,"filePosition":9,"length":14,"parameters":[{"letter":"X","value":"-10","isString":false},{"letter":"F","value":"6000","isString":false}],"command":"Code"}
4 CDE:
G1 X-10 F6000
4 CDE Type:
G
send: {"command":"Flush","Channel":"HTTP","SyncFileStreams":false,"IfExecuting":true}
recv: {"result":true,"success":true}
send: {"command":"Resolve","Type":0,"Content":null}
recv: {"sourceConnection":43,"result":null,"type":"M","channel":"HTTP","lineNumber":4,"indent":0,"keyword":0,"keywordArgument":null,"majorNumber":121,"minorNumber":null,"flags":2049,"comment":null,"filePosition":23,"length":5,"parameters":[],"command":"Code"}
5 CDE:
M121
5 CDE Type:
M
send: {"command":"Flush","Channel":"HTTP","SyncFileStreams":false,"IfExecuting":true}
recv: {"result":true,"success":true}
send: {"command":"Resolve","Type":0,"Content":null}
recv: {"sourceConnection":0,"result":null,"type":"M","channel":"Trigger","lineNumber":null,"indent":0,"keyword":0,"keywordArgument":null,"majorNumber":409,"minorNumber":null,"flags":4097,"comment":null,"filePosition":null,"length":null,"parameters":[{"letter":"K","value":"network","isString":true},{"letter":"I","value":"1","isString":false}],"command":"Code"}
Switching to InterceptConnection(InterceptionMode.POST gives this:
pi@A1000-0:~/A1000 $ python intercept.py
send: {"mode":"Intercept","version":12,"InterceptionMode":"Post","Channels":["HTTP","Telnet","File","USB","Aux","Trigger","Queue","LCD","SBC","Daemon","Aux2","Autopause","File2","Queue2","Unknown"],"AutoFlush":true,"AutoEvaluateExpressions":true,"Filters":null,"PriorityCodes":false}
recv: {"success":true}
recv: {"sourceConnection":0,"result":null,"type":"M","channel":"Trigger","lineNumber":null,"indent":0,"keyword":0,"keywordArgument":null,"majorNumber":409,"minorNumber":null,"flags":4099,"comment":null,"filePosition":null,"length":null,"parameters":[{"letter":"K","value":"network","isString":true},{"letter":"I","value":"1","isString":false}],"command":"Code"}
1 CDE:
M409 K"network" I1
1 CDE Type:
M
send: {"command":"Flush","Channel":"Trigger","SyncFileStreams":false,"IfExecuting":true}
recv: {"result":true,"success":true}
send: {"command":"Resolve","Type":0,"Content":null}
recv: {"sourceConnection":0,"result":null,"type":"M","channel":"Trigger","lineNumber":null,"indent":0,"keyword":0,"keywordArgument":null,"majorNumber":409,"minorNumber":null,"flags":4099,"comment":null,"filePosition":null,"length":null,"parameters":[{"letter":"K","value":"network","isString":true},{"letter":"I","value":"1","isString":false}],"command":"Code"}
2 CDE:
M409 K"network" I1
2 CDE Type:
M
send: {"command":"Flush","Channel":"Trigger","SyncFileStreams":false,"IfExecuting":true}
recv: {"result":true,"success":true}
send: {"command":"Resolve","Type":0,"Content":null}
recv: {"sourceConnection":0,"result":null,"type":"M","channel":"Trigger","lineNumber":null,"indent":0,"keyword":0,"keywordArgument":null,"majorNumber":409,"minorNumber":null,"flags":4099,"comment":null,"filePosition":null,"length":null,"parameters":[{"letter":"K","value":"network","isString":true},{"letter":"I","value":"1","isString":false}],"command":"Code"}
3 CDE:
M409 K"network" I1
3 CDE Type:
M
send: {"command":"Flush","Channel":"Trigger","SyncFileStreams":false,"IfExecuting":true}
recv: {"result":true,"success":true}
send: {"command":"Resolve","Type":0,"Content":null}
recv: {"sourceConnection":52,"result":null,"type":"M","channel":"HTTP","lineNumber":1,"indent":0,"keyword":0,"keywordArgument":null,"majorNumber":120,"minorNumber":null,"flags":2051,"comment":null,"filePosition":0,"length":5,"parameters":[],"command":"Code"}
4 CDE:
M120
4 CDE Type:
M
send: {"command":"Flush","Channel":"HTTP","SyncFileStreams":false,"IfExecuting":true}
recv: {"result":true,"success":true}
send: {"command":"Resolve","Type":0,"Content":null}
recv: {"sourceConnection":52,"result":null,"type":"G","channel":"HTTP","lineNumber":2,"indent":0,"keyword":0,"keywordArgument":null,"majorNumber":91,"minorNumber":null,"flags":2051,"comment":null,"filePosition":5,"length":4,"parameters":[],"command":"Code"}
5 CDE:
G91
5 CDE Type:
G
send: {"command":"Flush","Channel":"HTTP","SyncFileStreams":false,"IfExecuting":true}
recv: {"result":true,"success":true}
send: {"command":"Resolve","Type":0,"Content":null}
recv: {"sourceConnection":52,"result":null,"type":"G","channel":"HTTP","lineNumber":3,"indent":0,"keyword":0,"keywordArgument":null,"majorNumber":1,"minorNumber":null,"flags":2051,"comment":null,"filePosition":9,"length":14,"parameters":[{"letter":"X","value":"-10","isString":false},{"letter":"F","value":"6000","isString":false}],"command":"Code"}
6 CDE:
G1 X-10 F6000
6 CDE Type:
G
send: {"command":"Flush","Channel":"HTTP","SyncFileStreams":false,"IfExecuting":true}
recv: {"result":true,"success":true}
send: {"command":"Resolve","Type":0,"Content":null}
recv: {"sourceConnection":52,"result":null,"type":"M","channel":"HTTP","lineNumber":4,"indent":0,"keyword":0,"keywordArgument":null,"majorNumber":121,"minorNumber":null,"flags":2051,"comment":null,"filePosition":23,"length":5,"parameters":[],"command":"Code"}
So the error response is being redirected away from DWC, but where is it going?
Looking at the responses, I can't decipher if one of those is the error message. They all just look like G and M code intercepts that are confirmation that the DCS received the command. Is there a specific flag or function for errors/faults?
Is the error trapped in the M121 response? Is it the "majorNumber":409 or "flags":4900 keys? If so, is there a lookup table for these values? I didn't see anything on Github.