You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old April 9th, 2021, 07:35 AM   #1
mikeexplorer
Member
United States

mikeexplorer is offline
 
Join Date: Nov 2018
Location: Scranton,PA
Posts: 80
My Model Train PLC Project Update

I have been doing this project as a means to learn PLC programming. Awhile back I got stuck in a rut with doing this project and I asked some questions here. Thanks to others who pointed out some bad programming practices I was using in designing this project I was able to overcome the problems.



Originally I designed it with a Micrologix 1000 PLC, but soon ran into several problems, one was the limited I/O and that it could not be expanded. Plus its a discontinued model and twice I had to repair it for bad output relays. It also had limited memory and by the time I wrote in one of the train operations, I was nearly out of memory.



This is the "Second generation" project. I upgraded to a Micrologix 1400 which allowed for more I/O and Ethernet capability for the HMI. The RSlogix Micro Starter was not the expensive to purchase (about $160) so for a "home budget" it was a good way to go. I am using a C-more Micro for the HMI panel because it was not expensive. I also had on hand a smaller 4 inch panel which I discovered also has an ethernet port so I plan to use it for a second display. I originally bought this one several years ago to use with my trainer kit and basically has sat off to the side for awhile. Now I can use it.



Eventually this project will be transferred to my living room. I already have an around the ceiling layout now so I designed this project to be basically the same track layout. I have a pedestal from an old take-out robot which is where the HMI panel will be mounted.



This is a tour of the project with the hardware and ladders and a demonstration of routines. At the time I didn't have any written yet but I designed a menu system for the routines. It was originally an idea of the "mission" code that is on the website "contact and coil" but I later designed my own way to run routines and seamlessly hand off to another routine.


https://youtu.be/J8KkBaR-8PE
  Reply With Quote
Old April 9th, 2021, 07:37 AM   #2
mikeexplorer
Member
United States

mikeexplorer is offline
 
Join Date: Nov 2018
Location: Scranton,PA
Posts: 80
This is a more recent video that demonstrates the train operation routines and handing off from one to another. In this case I have actual train operations written.


https://youtu.be/hqwPICviN0U
  Reply With Quote
Old April 9th, 2021, 07:45 AM   #3
mikeexplorer
Member
United States

mikeexplorer is offline
 
Join Date: Nov 2018
Location: Scranton,PA
Posts: 80
One of my locomotives has been acting weird with its direction control. It is due to the electronic direction control is failing and over time it is getting worse. However, I have been able to exploit this problem as a means to test my programs to react to a situation where things don't go as planned. This is one example where the subroutine gave up after so many tries to get the locomotive to run in the correct direction and shut down the layout.



https://youtu.be/WPXMWCp6vd8
  Reply With Quote
Old April 9th, 2021, 07:50 AM   #4
mikeexplorer
Member
United States

mikeexplorer is offline
 
Join Date: Nov 2018
Location: Scranton,PA
Posts: 80
The program for this project is large, but as shown above with the train operation routines and the menu system how one routine can hand off to another and the concept of routines that run endlessly and some routines that do an operation and end. If anyone wants to see that part of the code I will post it.



It is kind of a "mission" as described in "contact and coil" but utilizes integers to jump to the selected operation and using a flag that I call "end request" which will tell an endless running routine to end its operation at a given state. Train operations that are not endless would ignore this flag, complete its operation, then end.



I am using integers to indicate what the current running routine is, and what the "next" routine will be and another integer is set as a flag to tell the main ladder that the routine has ended so it knows to hand off to the next routine.


Mike
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
New to PLC, Help needed for a project Arvind rangarajan LIVE PLC Questions And Answers 22 November 12th, 2013 10:38 PM
GE Fanuc - Download Project to PLC failed NR_Locus LIVE PLC Questions And Answers 3 September 9th, 2013 02:10 PM
Concept / Momentum - copy program to another PLC Model? mjrusso45 LIVE PLC Questions And Answers 5 September 4th, 2013 09:07 AM
PLC small project problems wolves-32 LIVE PLC Questions And Answers 3 February 13th, 2013 07:11 PM
help me regarding my project on plc santosh_43 LIVE PLC Questions And Answers 7 December 18th, 2006 02:22 AM


All times are GMT -4. The time now is 09:43 AM.


.