Jump to content

Recommended Posts

  • MVP 2023

That looks amazingly like the Example program Kikis posted for you.  You're having trouble modifying the code because you didn't write it and you don't know how it works.  The problem with a Set/Reset and Contact type program (A.K.A. "A Bit-Banger") is they are very difficult to insert new steps in after they've been written to perform a certain task.

Fear not, young Padawan.  There is a better way, but you must study the Ways of the Force.  You are trying to program a sequence, which can easily be defined using a flow chart.

Read the following post three times:

 

Then download my State Machine example program and study how it works.

Then list the  steps of your sequence.  On paper.  Use circles and arrows.  A paragraph on the back is optional.

From your written steps, see if you can implement the State Machine.  You should be able to do it in four networks with three timers, based on your previous posts and this new information.

Upload what you come up with, even if it doesn't work right.  We'll worry about the analog output for the speed after the output coils are working.

Joe T.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...