Selector Switch With Multiple CLICK Programs.

dylantzips

Member
Join Date
Jun 2018
Location
Ohio
Posts
27
Hello, beginner here.

We have a mobile cart at the plant I am interning at. Right now it has a single program on the CLICK PLC. They want it so that you can use a selector switch (Still needs installed) to switch between two different programs. I know I will have to combine them into a single program but I am not sure exactly how to do it. Would each program be a different subroutine? What would the main routine look like?

Thanks in advance!
 
There are several ways... but if they are small, just use bits a the start of the rungs, so for example your switch (X002) will make C2 true or false, so by adding C2 to each rung you can have that rung be true or false, then when you flip the switch to the other position C2 will open and if you used a normally closed C2 on your other program then it now would be true

One question would both programs be using the same I/O? if yes then you would need to have two subroutines and call them with the position of the switch

AD.png
 
Something to add... It is a four position selector switch. We want to be able to switch between the two programs (Position 1 and Position 2), and have Position 3 disable the part locking mechanism of the first program. Sorry if my wording is confusing.
 
Be careful with conditional subroutines. If you stop calling a subroutine, it will not turn off "coils" that were set to "1" during the previous scan and so there will usually be some extra steps required to make it work.

Conditional subroutines can make sense and be the right way to go, but in my experience, it is pretty rare that conditional routines make for the best fit.

Depending on the differences between the 4 "programs" you might find a cleaner solution by simply selecting different source data for a sequencer or control algorithm.
 
Be careful with conditional subroutines. If you stop calling a subroutine, it will not turn off "coils" that were set to "1" during the previous scan and so there will usually be some extra steps required to make it work.

The way I have done it in the past is to have all the outputs in the main (not in the sub's) and have a first scan setup to set everything back to 'zero' when the switch changes states (turned to another position)
 

Similar Topics

Good Afternoon , We all must of done this before ...... Installing a Frequency Drive in an enclosure , you forget how deep your selector...
Replies
1
Views
144
Water plant operator twisted the shaft off of this old 4 position selector switch that is mounted in a panel built as a bypass panel for a Danfoss...
Replies
5
Views
2,809
Hello, I’m still a beginner at plc programming. I am trying to use a 3 position selector switch in factory talk studio to simulate a Reset, manual...
Replies
5
Views
3,473
Good Morning , I'm working on a FactoryTalk View ME project , and I'm using , out of the Symbol Factory , ( in the 3D Pushbutton group ) a...
Replies
7
Views
3,500
This is my first dive into the newer "View Designer" after two decades of RSView/Factory talk. Am I missing something or is there no simple built...
Replies
6
Views
7,118
Back
Top Bottom