can I echo a string ?
-
I am using version 3.4.6 on Mini5+ board
I tried to echo a string but it doe not seem to work for me. However I have seen examples of its use in sample code in the online documentation. I am trying to debug the my code
;trigger2.g echo "trigger2" ;should echo to console G1 V -10 F1000 ; move Middle drive 10 mm M581 P2 S1 T2 R0 ; Set trigger2.g again
I am trying to see if the file gets triggered , I know G1 gets executed but only once and it will not work the second time. I have to reset the machine either by uploading a new trigger file or config file.
other information that might be useful is the config
;back sensor 1.io0.in M950 J1 C"!1.io0.in" ; conveyor back sensor M581 P1 S1 T1 R0 ; calls trigger1.g ; front sensor 1.io2.in M950 J2 C"!1.io2.in" ; conveyor front sensor M581 P2 S1 T2 R0 ;trigger2.g
any help is appreciated
-
i use the same echo in my files and it works ok, but sometimes the message does not appear in the console usually due to poor wifi connection.
-
@moth4017 That what I thought at first. However, I have never seen echo work - The WiFi is right next to the machine, router and the PC. eg they are all withing 1 meter of each other.
Also does not explain why the trigger only works once. I must be missing something
-
@Behrouz-AKT when do you run your trigger2.g file?
you would trigger a macro with
M98 P"/macros/ProbeDropOff" ; probe drop offor
M98 P"0:/sys/global.g" -
@moth4017 if you want to control where the message appears, use M118 instead of echo.
-
@moth4017 Not sure I understand . In essence pin 1.io2.in in an input from optical sensor and (digital signal). When the sensor is triggered then trigger2.g file gets called. The problem is that this only works once. Are you saying that I should not be processing in the trigger file? is the trigger2.g not a macro ?
-
@Behrouz-AKT
sorry misunder stood what you were doing , i do external triggers as below;External Buttons
M950 J1 C"!e3stop" ; config input pin switch NO connected to io2 and Gnd
M581 P1 T0 C0 ; T0 = emergency stop on trigger; T1 = pause print; T{N} = runs the macro "sys/trigger{N}.g", rising edge S1 falling edge S0
;M581 P1 T4 c0 ; run a macro trigger4.g
M582 T0 ; Check External Trigger