create a rotary switch in TIA Portal

mike3475

Member
Join Date
Feb 2013
Location
brooklyn ,NY
Posts
334
Hi, everyone:
I got issue with creating a rotary switch in TIA Portal.after start simulation, this sw doesn't rotate at all.
I follow one video in youtube about creating rotary sw, the first is going to "Event" tap of the Property, then choose "SetBit" for "Switch ON" and select a tag, the second is choose "ResetBit" for "Switch OFF" and select the same tag as "Switch ON".
I could miss something important step, need someone help.
I use S7-1500 TIA Portal V15.1.
Thanks in advance!

2.PNG 3.PNG 4.PNG
 
Last edited:
Thanks for your suggestion.
I tried your configuration , I got switch moved to ON, after I released it, it right away came back to OFF. I monitored program with this tag, i never saw it turned ON when i played with this switch in HMI. I created many push buttons in other screens, they worked good.
I use S7-PLCSIM V15.1, It matches with my TIA Portal V15.1.

Thanks!
 
You shouldn't need to use any events with the "Switch" object to do what you want. It should automatically toggle the value when you click on the object.
 
I created new tag in a new network and used it for HMI tag, then created new rotary sw in HMI, but got the same issue: after click the sw to on, it right away comes back to off.
I am sure this is nothing wrong with code.I tried many different
configurations,no help.
I forgot when simulation in HMI, I got warning message attached below.but every push buttons works fine.
I count my PLC tag is 42, my HMI tag is 9 for now.
Thanks!
Happy new year everyone!

10.PNG
 
Last edited:
I created new tag in a new network and used it for HMI tag, then created new rotary sw in HMI, but got the same issue: after click the sw to on, it right away comes back to off.
I am sure this is nothing wrong with code.I tried many different
configurations,no help.
I forgot when simulation in HMI, I got warning message attached below.but every push buttons works fine.
I count my PLC tag is 42, my HMI tag is 9 for now.
Thanks!
Happy new year everyone!


The HMI simulation uses the PC based WinCC Advanced Runtime (128 tags is the smallest license available). Don't worry about the license popup, its mostly just indicating that you're running in a demo/trial mode (which makes sense for a simulation). If you actually needed a real PC based system, then you'd need the license.


Can you show us the network in the PLC that uses the tag?
 
my S7 professional license just expired this morning, but i have some code copy for it. my WinCC Advanced license has 12 day left, i still can play with HMI, but can't do simulation any more.
Thanks mike!

6.PNG 7.PNG
 
Last edited:
This should've taken two minutes or less to achieve. You create a tag on the PLC side which can be PLC tags or DB ones. Drag and drop the switch on a screen and in its general properties you browse to the PLC side tag you created earlier and boom everything works.



Now which tag in the screenshots you posted is attached to that switch? If it's I0.0 you out of luck simulating that or getting the switch to work except when the input is turned ON.
If it's one of the M bits then it should work and if it is not working that could be due to the same bit, byte or word (M0.0, MB0 or MW0) is being used somewhere else like when turning on system/clock bits.


Edit: OK I see it now. It's I11.0 which is customer precondition tag. That is a physical input and that will be evaluated every scan and unless it's ON/High that tag will will remain off no matter what you do with the switch.
One way to approach this is to OR the input with a M or DB tag
 
Last edited:
Thanks kalabdel.
since I11.0 (CUSTOMER PRECONDITION) Tag in FC1 is without memory / data storage. that will effect that rotary switch I created in HMI screen behavior (acting like momentary push button) . that is why when i press this sw, it will go to ON, after I release it, it will come back to OFF. How can I make this sw to operate normal (like maintained switch or push button)-at first clicking ,it goes to ON and stays ON, at second clicking, it goes to OFF and stays OFF.
Thanks!
 
It has nothing to do with FC or FB and to do with how the input is evaluated. In effect what you are trying to do is to turn on the input programmatically which is not possible with Siemens and at the matter of fact you can not even toggle it on in Simulation; you can only Froce it using a force table.


So the CPU will check the actual status of the input every scan and if it finds it ZERO or OFF then it will set its tag to off.



As I mentioned one way is to use another tag and OR that input but of course in most cases we take more consideration when operating the same functions/tags with hardware input and HMI controls. There usually is logic to set Remote or Local cotrol and which one has priority and what would happen it one is on and the other is off when switching from Local to Remote or vice versa. Also we have to watch for a process changing between the press of the HMII button and the tag doing its work. It can get convoluted but for the very basic is to OR the input.
 

Similar Topics

Hello, I've been trying to learn this a while now and still have not found out how this works. I have an Omron CJ2M PLC and an ABB ACS 355 VFD...
Replies
1
Views
219
Hello, I have to deal with iFix again and am looking at the most efficient way to create alarms to display in iFix, i.e. not creating an...
Replies
0
Views
147
Good morning to all, I have the following issue, I installed everything of intouch including the patch, it is the 2023 version. The...
Replies
0
Views
318
So, I finally got versioin 27 installed on my Windows 10 VM. However, now I can't upload a project from my lab controller. I have the above error...
Replies
0
Views
1,124
Hi all, I have few GB of logged data created by RS View 32 Works, it is all in .DBF format. At the moment, my company wants to shift all data to...
Replies
14
Views
1,432
Back
Top Bottom