Plantmetrics Modbus Communications

Join Date
Apr 2002
Location
Just a bit northeast of nowhere
Posts
1,117
This isn't a question, it's to share what I've discovered so that the next poor sap who attempts this will be able to avoid some of the pitfalls I've climbed out of...

The hardware :

Unitronics Vision 280 with ethernet option.

Make SURE you have the latest firmware - the modbus IP slave address of 255 no longer applies, and can be disregarded IF you have the latest firmware. Note, you do not get the latest frimware when you download Visilogic, it has to be done separately from within Visilogic using the Check for Updates function.

The Software :

Plantmetrics from Rockwell Automation

Configuration is pretty straightforward, but watch out for the bug described here :
http://www.plctalk.net/qanda/showthread.php?s=&threadid=10630

When assigning addresses to data points in Plantmetrics, use Matrikon aliases at you own risk. I couldn't get them to work, but I might have been making configuration mistakes.

Matrikon OPC Server for Modbus (plant based edition) from Matrikon Software

This software has it's own set of problems. Most critically, it doesn't poll PLCs once it loses contact with them, like RSLinx does (nod to Ken and company). When you lose a node in Linx, it looks for the node until it finds it or you tell it to stop by removing the node from the configuration. Not so, Matrikon.

If the machine is powered down, data collection stops (obviously). When the machine is powered up again, and the ethernet card is reinitialized, Matrikon takes notice and begins polling again.

If, on the other hand, you reboot the computer hosting the Matrikon software, and it comes up while the machine is running IT WILL NOT GO LOOKING FOR THE MACHINE! It sits there staring into space, waiting for the machine to yell, "Hey, dumba$$, over here!"

Now, to Matrikon's credit, it seems they've attempted to fix this problem with the "Check Connection" box on the TCP driver. Watching it's behavior, it seems to be polling every 5 seconds for a particular memory address to see if the PLC is out there someplace.

However, I cannot confirm this as yet, since the address the Matrikon software is looking for is not implemented in the V280 controller from Unitronics mddr So the box serves no purpose here.

Ah, but happy day, I have a work-around. In the V280 is a register
SDW 20, which is the default modbus register for sessions (packets) received. This will not increment unless actively scanned by the Matrikon software.

I bet you know what happens next. Sample SDW20 every second, then compare the register value to the previous value to see if it's changed. If not, begin cycling a 60 second self-resetting timer. Whenever this times out, it re-scans the V280 ethernet intialize and Modbus IP setup function blocks (normally a Power-Up Bit job). If comms come back on line, well and good, if not, it tries again 60 seconds later. This happens in the background, and does not affect the machine's operation.

Basically making the Uni yell, "Hey, dumba$$, over here!"

I'm going to take a little time and boil all of this down into a file I can upload for everybody's review, in case anybody finds it useful. Later today or tomorrow.

Thanks for all the help!

TM
 
Continuing

In the on-going adventure of connecting a Unitronics V280 to Plantmetrics via Matrikon OPC server, I've a new entry to include:

ML (Memory Long) registers:

It's not immediately apparent, looking at the help files (it is there if you dig a bit, though), but Unitronics maps it's 32-bit registers into TWO adjacent 16-bit registers for reading by Modbus applications.

The Modbus Slave Addressing Map shows ML addresses as starting at address 5100. This is true. What is not expicitly spelled out is that the first ML, ML 0, is actually in addresses 5101 AND 5100. Furthermore, since every ML consumes 2 addresses, the numbering advances by 2's.

If using Matrikon Explorer to read this, you must use the "3" command with the "D" modifier in the address. The D modifier reads two adjacent 16-bit registers and returns them as a single 32-bit number.

Format: servername.3:xxxxxD

Examples :

On server named TimPrint:

ML 0 = "TimPrint.3:05101D"

ML 10 = "TimPrint.3:05121D"

Memory Float

Although the Unitronics help file might lead you to the impression only MF 0 is accessible, in fact, they all are, and in a similiar manner to the ML registers.

The notable differences are, you must use the "F" modifier in place of "D", and the "S" modifier as well, so the high and low values are reversed.

Examples :

On server named TimPrint:

MF 0 = "TimPrint.3:07701FS"

MF 10 = "TimPrint.3:07721FS"

It's important to put the "FS" in the correct order. If you get it backwards, the values will not be swapped, and the result will be unintelligble.

Incidentally, thanks goes to Jordan at Matrikon for pointing out the modifiers. But if anybody there reads this, THIS is the sort of info I'd like to see in a white paper. Yeah, I know there's alot of products out there to talk to with OPC, but if you're doing the testing anyway, why not make a simple step-by-step while you're at it? These two tidbits would have saved me about 3 hours of trial and error.

More to come later.

TM
 

Similar Topics

So, I'm using Plantmetrics and loving it. Great stuff. Now comes the time to hook up to another controller using Matrikon OPC Server for Modbus...
Replies
1
Views
4,932
Hi Guys, We have a Plantmetrics Ver 7.0 running on a server which is on it's last legs. We are trying to move the application to new server and...
Replies
0
Views
1,499
Hello everyone. I am trying to get reports to e-mail automatically from a PlantMetrics system at one of my customer's sites. I can schedule the...
Replies
5
Views
6,107
Any PlantMetrics users out there? I'm setting up one of the existing Report Objects called "Units by hour" which is a chart. By default it sets...
Replies
6
Views
2,043
T
Greetings from home PLC people! We have at last gotten our hands on the long-awaited Plantmetrics data collection package. Our local rep gave us...
Replies
7
Views
3,720
Back
Top Bottom