I have very little experience in writing code except for a few simple programs and have been asked by a friend to produces a circuit to give visual indication of a condition of a point solenoid on a model train track. on powering off the requirement is to retain the indication of the last point condition when powering up as the solenoid retains its position. The program i have so far using an 08m2 works but i cannot get the variable to store using the write command. i do not know if the simulator does not show the command or it does not perform the action, but the syntax does not say it is wrong. these are the 2 subroutines.
pointA:
b1 = 1
write b2,b1
if point = 1 then high outA endif
if point = 1 then low outB endif
return
pointB:
b1 = 0
write b2, b1
if point = 0 then low outA endif
if point = 0 then high outB endif
return
I obviously have done something wrong and would appreciate some guidance
vernon
pointA:
b1 = 1
write b2,b1
if point = 1 then high outA endif
if point = 1 then low outB endif
return
pointB:
b1 = 0
write b2, b1
if point = 0 then low outA endif
if point = 0 then high outB endif
return
I obviously have done something wrong and would appreciate some guidance
vernon