Internet PLC Forum
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Search
Login
Register
Internet PLC Forum
»
General
»
Technical support
»
High Speed Counter Variable access?
« previous
next »
Print
Pages: [
1
]
Author
Topic: High Speed Counter Variable access? (Read 10183 times)
skj1402
Newbie
Posts: 28
The Innovator!
High Speed Counter Variable access?
«
on:
November 27, 2005, 12:21:48 PM »
From within the simulators 'View Variables' table, you can view the incrementing count of a HSC input (say #1). But how do you gain access to that variable count from within TBasic?
What I would like to do is display the contents of the HSC1 output to the LCD display in a dynamic real time fashion (as seen from within the above table). Can you please advise how I can do this? ???
Logged
support
Global Moderator
Hero Member
Posts: 3174
Re:High Speed Counter Variable access?
«
Reply #1 on:
November 27, 2005, 01:13:38 PM »
The HSC present value is available to TBASIC as a variable: HSCPV[1] to HSCPV[2].
To display its value on LCD, you can do the following:
SETLCD 1,1, STR$(HSCPV[1],8) ' display 8 digits of HSCPV
Logged
Email: support@triplc.com
Tel: 1-877-TRI-PLCS
plc_user
Guest
Re:High Speed Counter Variable access?
«
Reply #2 on:
November 30, 2005, 08:03:49 PM »
Don't forget in the simulator to adjust the high speed counter variable to see a value other than 0.
From the view variable table there is a place to edit variables.
Type HSCPV[1]=199,20, etc.
You will be able to see how it looks after using the information that support left you from the previous post.
Logged
Print
Pages: [
1
]
« previous
next »
Internet PLC Forum
»
General
»
Technical support
»
High Speed Counter Variable access?