Gamble Posted February 16, 2007 Report Posted February 16, 2007 I would like to get the K value of a timer and store it in a data register. Is there anyway to do this? For example if i have T0 set with K200 I would like to take that 200 and store it in register D0. Quote
FNMdeJong Posted February 16, 2007 Report Posted February 16, 2007 No this is not possible, because K100 is hardcoded in your application. It is no device value. So there is no need for this possibility. If you want to get the value of the actual couting of the timer then it is possible see previous question from mckeand13. Quote
JRoss Posted February 16, 2007 Report Posted February 16, 2007 Gamble, what you are asking is the reverse of what is typically done. Put the value of your timer (K200) into a data register, then use the data register in the timer coil: --|M8000|----[MOV K200 D0]-- --|X1|------------------(T0 D0)-- Now you'll have access to the timer value for other purposes. You could even push a value into D0 from an HMI or math instruction, for dynamic changes, instead of hard-coding the MOV instruction. Quote
Gamble Posted February 19, 2007 Author Report Posted February 19, 2007 Thanks JRoss that works well. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.