6/15/2018 9:05 AM | |
Joined: 11/15/2017 Last visit: 6/13/2024 Posts: 78 Rating: (16) |
Hello Everyone, I'm Using a 1511-PN with TIA portal V15. I'm trying to write a little program that toggles an output based on a (Integer) number that is put in by the user. When the user puts in 0, the program has to set Q0.1, for input 1, the output Q0.5 has to be set, Input 2 sets Q1.1, 4 sets Q1.5 Etc. So far i've used a snippet from this topic to determine if the Integer is odd or even. A Odd number would result in output Qx.5, Even would mean Qx.1. Then for x i've used the following: If odd: (Input integer-1)/2 So no i have two separate integers that i'd like to use to define the output. I just don't know how to set the command Qx.y = 1 |
Last edited by: Sibrand at: 6/15/2018 9:06:02 AM |
|
Follow us on