OPTO22

M

Thread Starter

mwkees

I am a new user to OPTO22, and I am having trouble programming. I can set up the flowchart. At this point I am having trouble making a counter work. I am using a digital input as a counter. I first clear the counter, then start the counter, and after a period of time I stop the counter and look at the counts, but I am not getting any counts. I watch the counter and see the XVAL is counting but the IVAL is not, what am I doing wrong?
 
J

Jayaharan C J

Dear Mwkees,

The IVAL will not update unless otherwise you execute any read command related to the brain to which the input is connected.

In a continuous running chart execute the command
"Get I/O unit as Binary value" which moves the entire status of the brain to a Integer32 variable. You have to give the corresponding brain and a new Integer32 variable for this command

If this command is executed continuously then your counter value will be continuously updated in the IVAL.
You may seek my help on any further queries/clarifications.

Hope this helps

All the best.

Jayaharan C J
Systems Analyst
Ramco Systems Limited
India
[email protected]
 
J

Jayaharan C J

Dear Mwkees,

To add further, you should use the command "GET Counter" or "Get and Clear Counter" command in some part of the continuous running chart to read digital input counter value.

Hope this helps

All the best.

Jayaharan C J
Systems Analyst
Ramco Systems Limited
India
[email protected]
 
Top