Logan1101 Posted May 25, 2022 Report Posted May 25, 2022 I am trying to learn to write structured text using GX Works 1.597x in my spare time . I can't find much information on how to write timers in the logic using structured text. Can anyone point me in the direction of some good descriptive manuals, or some sample code using timers. I have looked through numerous manuals and haven't found any good information on timers. I work maintenace and none of my equipment uses structured text, so I currently have no reason to learn it other than just for fun, so constantly reading manuals and learning the same information from every manual and yet not finding a single piece of information containing to timers in ST is getting really annoying and discouraging to learning the new language. Thanks in advance
tosza93 Posted May 25, 2022 Report Posted May 25, 2022 The easiest way to find an ST instruction is to use the F1 help on FBD/LAD functions. In the help you'll find program examples in multiple languages, include ST. Example in attached pic.
tosza93 Posted May 25, 2022 Report Posted May 25, 2022 You don't need to use the whole instruction. It'll work if you use it like this: TON_Inst(IN:= g_bool1 ,PT:= T#10s); And you can use multiple condition in the "IN:=" section, for example: TON_Inst(IN:= (g_bool1 AND g_bool2 AND ect...), PT:= T#10s); If you use it like this, you can refer to the operation condition of the timer in the further program lines like this: TON_Inst.Q
Logan1101 Posted June 3, 2022 Author Report Posted June 3, 2022 On 5/25/2022 at 2:25 AM, tosza93 said: You don't need to use the whole instruction. It'll work if you use it like this: TON_Inst(IN:= g_bool1 ,PT:= T#10s); And you can use multiple condition in the "IN:=" section, for example: TON_Inst(IN:= (g_bool1 AND g_bool2 AND ect...), PT:= T#10s); If you use it like this, you can refer to the operation condition of the timer in the further program lines like this: TON_Inst.Q Using a timer in GX works 3 Structured text makes perfect sense now, but using it in GX Works 2 is different. How does it work in GX Works 2
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now