best way to check a connection

userxyz

Member
Join Date
May 2002
Location
any
Posts
2,768
I want to detect an MPI connection,

We have 1 PLC with global data, he sends it to all other PLC's on the MPI network. Stand-Alone machines with plc's, connected to the global data PLC.

So, I toucht, let's write it like this:

code in the stand alone machine:
- Fast clockpulses coming from the global data plc.
- Clockpuls/s in the stand alone machine
- if longer then 3s no pulses detected => NO_CONN


Better Ideas? :::

MPI_CHK_1.JPG


MPI_CHK_2.JPG
 
Hi Gerry,

Did you use 'Define Global Data'? It's available in your project when you right-click the MPI network. Or if you open NetPro, select the MPI bus and hit Define Global Data' from the Options menu. But maybe you already have a working MPI network set up...

You could have the 'Master' PLC set a single bit (like M0.0) continuously and have it sent to every participating PLC.

Put a polling routine in every participating PLC, and check if the matching bit is set. Have a timer (re)started if the bit is not set (by the master PLC), then reset the bit yourself at the end of the polling routine. Set an alarm tag if the timer has elapsed. Works for me every time! Make sure you use an interval much larger than the MPI refresh rate, so 3 seconds should be fine.
 
Last edited:
Hi sparkz

Hi sparkz,

I did use global data indeed.

The way u do it looks better...

I'll do it in your way,

thanks











Sparkz said:
Hi Gerry,

Did you use 'Define Global Data'? It's available in your project when you right-click the MPI network. Or if you open NetPro, select the MPI bus and hit Define Global Data' from the Options menu. But maybe you already have a working MPI network set up...

You could have the 'Master' PLC set a single bit (like M0.0) continuously and have it sent to every participating PLC.

Put a polling routine in every participating PLC, and check if the matching bit is set. Have a timer (re)started if the bit is not set (by the master PLC), then reset the bit yourself at the end of the polling routine. Set an alarm tag if the timer has elapsed. Works for me every time! Make sure you use an interval much larger than the MPI refresh rate, so 3 seconds should be fine.
 
Yep, looks great!

Though I would suggest using a 'S #NO_CONN', so one would still know if the connection was gone even for a fraction longer than 3sec.
 
but

But,

The Global_Data bit,

If you deconnect the MPI connector, the global_data bit will be 1..., so it won't work I think now... ?

We use M50.0 in all machines, so the global PLC gives a high bit to all PLC's, but when u deconnect the MPI cable, it will remain 1 ... , no ?
 
Not exactly,

The master PLC sends his LOCAL M50.0 bit and, according to your global data configuration, this bit is COPIED into every PLC's LOCAL receiving M50.0.

If the connection fails, the master PLC can not send (=copy) his bit into the receiving PLC: The receiving bit in every participating PLC will remain 0 (because it is being reset continuously at the end of the polling routine), leading to a timeout, and so on...

Don't worry, it'll work just fine...
 
polling

And this polling routine is something that goes automatically ?

And when I write a value in MW200 of the global data plc, it wil copy it's data into the MW200 of the Local. When you disconnect the MPI, will MW200 also become zero, or remain it's value ?

So the code I've written with the timer should work fine ?
 
wait a minute

wait a minute,

u mean that I need a polling routine in both plc's, the global and the remote... ?
 
wait a minute

Wait a minute, u mean that I need a polling routine in both PLC's, the global and the local ?
 
What I'm trying to say in my previous post, is:

There are no global addresses. You can have the sending PLC send any flag, or byte, or word, or double word, and have it received in a receiving PLC anywhere, as long as the format matches. So for instance, PLC-1 could send his MB5 and PLC-2 would receive it in his DB99.DBB0.

All depends on how the global data is defined. Only one sending address can be assigned at a time, but the data from that address can be received in several PLC's.

The sended information overwrites the assigned receiver address periodically, only if the connection is OK.

One could use a polling routine in the master PLC, all depends on where you want the alarm to be generated...
 
k

Well, it's like this:

We have 5 mixers connected on a MPI network to an global PLC with the Line Speed in it. We need to send the line speed to the mixers via global data. When there is no MPI cable connected on the mixer (these mixers can be replaced) then the setpoint must change to zero...




Sparkz said:
What I'm trying to say in my previous post, is:

There are no global addresses. You can have the sending PLC send any flag, or byte, or word, or double word, and have it received in a receiving PLC anywhere, as long as the format matches. So for instance, PLC-1 could send his MB5 and PLC-2 would receive it in his DB99.DBB0.

All depends on how the global data is defined. Only one sending address can be assigned at a time, but the data from that address can be received in several PLC's.

The sended information overwrites the assigned receiver address periodically, only if the connection is OK.

One could use a polling routine in the master PLC, all depends on where you want the alarm to be generated...
 
COMBO said:
We have 5 mixers connected on a MPI network to an global PLC with the Line Speed in it. We need to send the line speed to the mixers via global data. When there is no MPI cable connected on the mixer (these mixers can be replaced) then the setpoint must change to zero...
Have the global data set like this:

For the Line speed reference:
First column: Global PLC - fill in the corresponding address - set it as SENDER
Second to Sixth column: Mixer PLC #1 to #5 - fill in the corresponding address - set them all as RECEIVER

For the 'connection live' polling bit:
First column: Global PLC - M50.0 (right?) - set it as SENDER
Second to Sixth column: Mixer PLC #1 to #5 - any available bit address, does NOT necessarily have to be M50.0 - set them all as RECEIVER

Use the polling routine in every mixer PLC to check if the connection is OK, so the current Line speed is valid...
 
gdg.JPG


I have something like this,

Pressnip is the Sender. So, that part I understand. I did not do a test yet with a bit. But I remember that I tested this with 2 CPU's.

So, MW30 in the sender is 3000 for example, the receivers receive 3000, when u desconnect one receiver, then MW30 in the receiver isn't written anymore, but a markerWord holds it's value, so it remains 3000.

Therefore I think, when I will give a bit from the sender to the receivers, that this bit will remain on in the receivers, even when disconnected... because the marker keeps his last value... ?

I tested it wil MW30, and in that case, it's holds the value after disconnection,

So my collegue says now that I can only detect it with edges, pulses... that way...

what do you think ?
 
COMBO said:
...Therefore I think, when I will give a bit from the sender to the receivers, that this bit will remain on in the receivers, even when disconnected... because the marker keeps his last value... ?

I tested it wil MW30, and in that case, it's holds the value after disconnection,...
Totally correct!

But do you remember I adviced you to reset the polling bit at the end of the polling routine? Every receiving PLC forces his received polling bit to 0! The master PLC will overwrite this forced 0 at every new MPI cycle. If the connection is dead, the polling bit (in every receiving PLC) can not be refreshed by the master PLC, so it stays 0, because it was reset during the last PLC scan.

So, insert at row #2:
Column Pressnip Station - M50.0 - SENDER
Column Rack Mixer A - M50.0 (assuming it's available) - RECEIVER
Column Rack Mixer B - M50.0 - RECEIVER
Column Rack Mixer C - M50.0 - RECEIVER

- Set M50.0 continuously in the Pressnip Station PLC.
- Insert the polling routine (from post #4) in every Rack Mixer Station PLC (remember to reset M50.0 at the end of the polling routine!) and have it called in OB1 continuously.
- Also in every PLC, mark the Line speed as invalid as soon as a timeout occurs.
 
Last edited:

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,134
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