Is there a way to continuously map a system variable, which holds an integer, onto a analog or digital output (or even a numeric register)?
Mapping System Variables onto Outputs
-
oneslyfox -
December 13, 2013 at 4:42 PM -
Thread is marked as Resolved.
-
-
Hi
My answer for "continuosly map" will be background
Are you looking for something like ?
R[3]=5 loads value 5 into register 3
GO[1]=R[3] loads register 3 value into group of output 1. The result will be a value 5 in the group of outputsSimilar for inputs
-
Well more specifically I'd like:
AO[1] = $TCPPSPEED.$speed
-
I don't see why not. You can do it also for boolean system variables. False/true are referred as 0/1.
However, you cannot read the string system variables, even into a string register. -
Here is a line out of one of my BGlogic programs. Works great.
: GO[3:shelf_num_remove_ack]=R[10:shelf_num_remove] ;If you use BGLogic to transfer critical information I would also recommend setting up a heartbeat signal from the PLC and echoing it in your BGLogic program:
18: ;
19: R[15]=DI[84:BGLogic_Heartbeat] ;
20: DO[84:BGLogic_Heartbeat]=R[15] ;
21: ; -
Here is a line out of one of my BGlogic programs. Works great.
: GO[3:shelf_num_remove_ack]=R[10:shelf_num_remove] ;If you use BGLogic to transfer critical information I would also recommend setting up a heartbeat signal from the PLC and echoing it in your BGLogic program:
18: ;
19: R[15]=DI[84:BGLogic_Heartbeat] ;
20: DO[84:BGLogic_Heartbeat]=R[15] ;
21: ;
This has nothing with the topic subject, which is system variables. -
Yes, sorry you are right.
3: ;
4: !step mode to PLC ;
5: DO[23:Step Mode]=($SSR.$singlestep) ;
6: ; -
Here is a line out of one of my BGlogic programs. Works great.
: GO[3:shelf_num_remove_ack]=R[10:shelf_num_remove] ;If you use BGLogic to transfer critical information I would also recommend setting up a heartbeat signal from the PLC and echoing it in your BGLogic program:
18: ;
19: R[15]=DI[84:BGLogic_Heartbeat] ;
20: DO[84:BGLogic_Heartbeat]=R[15] ;
21: ;Our biggest problem is we don't have BG Logic on our robot. Is there any other way to do it without BGLogic?
-
Of course there is. Its just so many are fans of the BGLOGIC stuff that I think they forget not all customers purchase this option.
Just do it as a short TPE program that loops over and over or do it in Karel in the same fashion.
SO..
at the top of your 'main' program, simply do a RUN 'program name' and it will run in the background setting your output while your main foreground program executes like it should. You don't want to use the CALL , use the RUN command.
Hope this helps..
-
Of course there is. Its just so many are fans of the BGLOGIC stuff that I think they forget not all customers purchase this option.Just do it as a short TPE program that loops over and over or do it in Karel in the same fashion.
SO..
at the top of your 'main' program, simply do a RUN 'program name' and it will run in the background setting your output while your main foreground program executes like it should. You don't want to use the CALL , use the RUN command.
Hope this helps..
It works! Ah! Thank you, thank you, thank you.