Best way to cycle through messages?

Lakee911

Member
Join Date
May 2006
Location
Columbus, OH
Posts
98
What's the best way to cycle through multiple messages in a SLC? They're going out to different PLCs on diffrent networks. I'm thinking I only want to send/receive one at a time. I'd like to send/receive as fast as I can.

Thanks
 
What's the best way to cycle through multiple messages in a SLC? They're going out to different PLCs on diffrent networks. I'm thinking I only want to send/receive one at a time. I'd like to send/receive as fast as I can.

Thanks

For fast-as-possible messaging, here's what I do:

Trigger the first one on the first pass and if the last one is DoNe, ERrored or TimedOut. I unlatch the ENable bit of the last one, then I start the first MSG.

For the second, trigger it when the first is DN, ER or TO. Unlatch the first EN, then start the second MSG.

Continue of this way until you reach the last MSG.
 
Remember that the SLC-500 controllers have only one CPU to handle both messaging and logic, so you can trade some scantime for communications bandwidth by setting a bit in the Status file to process one MSG per scan, or process all queued MSGs per scan. This is the Communications Servicing Selection bit, which is S:2/15 for the Network port, and S:33/5 and S:33/6 for the Channel 0 serial port. Check out the Instruction Set Reference for details.

The way I like to sequence MSG instructions is with a Sequencer. I'll use an Integer register as the "message number", and each MSG instruction is conditioned with an EQU instruction, so when Message Number = 0 I'll fire my first MSG, and when Message Number = 1, I'll fire the second one, etc.

The .EN or the .DN bits of each MSG use a One-shot to ADD 1 to the Message Number value, which increments the sequencer. I reset the sequencer to 0 on the First Scan.
 
I thought about triggering one from another but how do I start the initial cycle and keep it going? Do the triggers need latched in with the ST bit?

SLC talking to other SLCs over Ethernet and also talking to PLC-5s on DH+ ControlLogix ENBT/DHRIO bridge.

Thanks.
 
I've done it in the classic method where one triggers the next, but I always seem to make a boneheaded typo or two, or end up making logic that can get "stuck", or scrolling up and down among a bunch of MSG instructions in a ladder trying to figure out which one is executing.

Off the top of my head (I didn't test it) here's a screenshot of the classic sequencing method using the status flags to "cascade" the messages:

Classic_Sequenced_MSG.jpg
 
Last edited:
And here's an example of what I use with an "index" register to trigger the messages.

Yes, it takes more instructions and rung space, but I really like being able to look at that one index register to visualize how fast the message instructions are cycling through the sequence, and to see if one is "hung up" or timing out.

Classic_Sequenced_MSG2.jpg
 
Sequencing is handier insofar as keep track of whats going on. It give you the ability to skip blocks of messages if you desire for a given situation. You can change the sequencer's number anytime you want to...in case you need to execute a call to a message promptly for some reason. Also, beware if you're using Modbus serial on 485 2-wire. Put some inter-message delay in (1/10sec or so) or the message may clash on the wire (Modbus only). AB's demo cde for addressing two drives via modbus does this (ML1400)....The second drive never even gets a chane to listen...mustn't have tested it.
 
New question ... what happens when a read comes in to my PLC from another PLC? Is it just as taxing to the processor for a remote read as it is for a write?

Thx
 
Sequencing is handier insofar as keep track of whats going on. It give you the ability to skip blocks of messages if you desire for a given situation. You can change the sequencer's number anytime you want to...in case you need to execute a call to a message promptly for some reason. Also, beware if you're using Modbus serial on 485 2-wire. Put some inter-message delay in (1/10sec or so) or the message may clash on the wire (Modbus only). AB's demo cde for addressing two drives via modbus does this (ML1400)....The second drive never even gets a chane to listen...mustn't have tested it.


I'm getting error 37h "Message timed out in local processor," which is one problem. The other problem is when the MSG errors, it gets hung up because the DN bit (12) stays high. Anyone got any ideas?
 
I'd just OR them together. They both mean done, essentially. They're done for different reasons...success or variety of errors. If you need to dig into the errors, the err bit is of help there. The done bit???who cares about it really...I'd just or it in and use the Err bit at your discretion. Neither get reset until the read / write attempt accurs again (I think). Is this RS232? 485 ? What protocol?
 
I will add in the ERror bit but the done bit staying high won't allow it to advance.

Ethernet for some MSGs and then some are bridged via that to DH+. Worked yesterday... :(
 

Similar Topics

Compactlogix controller, program has 28 conveyors that use TON's to start the conveyors. The TT sounds a warning horn during start and the DN...
Replies
10
Views
485
I have S7 1512C controler for controlling 48 PID temperature loop, the output is PWM. Please I need the best, most efficient way to write the...
Replies
13
Views
600
I am going to need to use HART multi-drop in order to handle a series of Vega Radar units. There are a lot of options and I'm wondering what...
Replies
3
Views
253
Out of interest, I'd like some thoughts on what would be considered best practice with regards to a 2-position turntable control scheme (see...
Replies
17
Views
1,130
Hello colleagues Anybody knows, what could be the best or a better option to bring with you when you are in service at factory to connect via...
Replies
1
Views
261
Back
Top Bottom