View Single Post
Old February 12th, 2018, 12:27 PM   #6
OkiePC
Lifetime Supporting Member
United States

OkiePC is offline
 
OkiePC's Avatar
 
Join Date: Mar 2005
Location: ENE of Nowhere Oklahoma
Posts: 9,782
I use a state engine to drive the polling. I use a timer to insert a minimum delay between each message. I use the DN and ER bits from each message to advance to the next state.

I use "config bits" to enable/disable stations. I work mostly with ML1400 and Click as the master PLC. The ML1400 will not allow online editing of rungs containing MSG instructions. By using a state engine (a series of mutually exclusive bits), My message logic is just examining a state bit and a MSG instruction. I completely control the sequence in separate logic without touching the MSG rungs so it can be done on the fly.

I will also have a timer that measures the complete poll time and I will store the fastest and slowest poll times. I like to show on the HMI the status of the polling so that you can visually tell where the hangups are happening (and they will happen!).



Attached Images
File Type: jpg Radio MSG States 000.jpg (57.0 KB, 66 views)
File Type: png Radio MSG States 001.png (35.2 KB, 67 views)
__________________
It's not all the variables I am most concerned with, it's the undiscovered constants.
  Reply With Quote