Talking to a Mettler Toledo JagExtreme. - old forum post

Roy Matson

Joined on 04-12-2007
Posts 1
Ethernet to Weigh Scale

Hi,

I need an example of how to set up the communications to 3rd party Ethernet device.

I have a Mettler Toledo JagExtreme weigh scale that I need to query at regular intervals in order to determinge rate of weight change. I have used this same scale in the past with AB PLC RIO so I am familiar with it’s requirements but as I am just getting my feet wet with Opto22 i’m not sure how to send the request and set up to receive the response. If anyone could send me an example of communications with a 3rd party ethernet device it would be much appreciated.

Regards

Roy Matson

Noram Engineering, Vancouver, British Columbia, rmatson@noram-eng.com

Report 
04-11-2007, 6:32 PM

Kiwi

Joined on 04-12-2007
Posts 4
Re: Ethernet to Weigh Scale

My main problem at the moment is establishing communications.

The scale IP add. is 192.168.100.011, I can ping it OK but if I set this address in the comms handle when I execute “Open Outgoing Communications” I get the error -412

My scale, the Snap Pac S1, I/O racks and PC all have the same subnet mask 255.255.255.000 and are plugged into a common switch

My comms handle reads as follows “tcp:192.168.100.011” Is there something missing there? I see in an example the comms handle has a port address after the IP, but I think thats for a serial port module.

Can someone shed some light?

Roy Matson

Report 
04-12-2007, 8:34 AM

jturner

Joined on 06-04-2003
Posts 6
Re: Ethernet to Weigh Scale

Hello Roy,

I don’t know if I have the answer you’re looking for, but I have a few things to look at.

  1. You definitely need a port specified in the comm handle. This needs to be the port that the weigh scale is listening on. Assuming that you’re using PAC Control, see the Communication Commands section in Chapter 10 of the PAC Control User’s Guide (Form 1700) for much more information.

  2. You mention that your IP address is 192.168.100.011. The last part, 011, is probably being interpreted as an octal number, not a decimal number. So try it as just 192.168.100.11. Here’s a few pages that discuss this issue:
    http://en.wikipedia.org/wiki/IPv4#Addressing
    http://msdn2.microsoft.com/en-us/library/ms738563.aspx
    Hope that helps!

  • Jim T.

    Report
    04-12-2007, 10:53 AM
    Kiwi

Joined on 04-12-2007
Posts 4
Re: Ethernet to Weigh Scale

Jim,

        Now after reading pages of conflicting information on ports I'm even more confused. It used to be that ports were real objects on a card somewhere. I can't find any reference to ports in the scale manual so I assume you are refering to an Opto22 port. If I click on my I/O (connected to the same switch as the scale) they all say under Port "Ethernet 2001" so logicaly for the S1 to talk to the scale it would also use Ethernet 2001, but the comms handle doesn't like 2001 either, I still get -412 reported in the "Open Outgoing Communications" result. The configuration PC is able to find the scale when I ping it.

Thanks

Roy

Report 
04-12-2007, 1:10 PM

jturner

Joined on 06-04-2003
Posts 6
Re: Ethernet to Weigh Scale

Roy,

The word port is definitely overused! You’re probably thinking of serial ports or other physical ports, which are very different from TCP/UDP ports.

Roughly speaking, TCP/UDP ports are combined with an IP address to uniquely identify a protocol or service at that address. For instance, web pages are accessed over the HTTP protocol on port 80, email often uses 25 and 110, and Opto 22 brains use 2001. Any one IP address may be listening on numerous ports. For instance, the SNAP-PAC-S1 listens on 2001 for brain traffic, 22001 for controller traffic, 21 for the FTP protocol, and many others.

So the port has nothing to do with what you’re talking out of, but only what you’re talking to. Pinging the device only means you can reach the IP address. It doesn’t relate to which ports are being listened to. Much more info on ports is available here: Port (computer networking) - Wikipedia.

Regarding your weigh scale, I looked them up and they seem to support numerous protocols. Each protocol should be listening on a different port. I couldn’t tell exactly which protocols they support, or if they also have their own protocol.

Good luck!

  • Jim T.

    Report
    04-12-2007, 1:33 PM
    Kiwi

Joined on 04-12-2007
Posts 4
Re: Ethernet to Weigh Scale

Jim,

     I called Mettler Toledo and was given the port number for the JagExtreme 1749 (I couldn't find that anywhere in the manual), the Opto seems quite happy with that (status 0). The guy also explained the message string format so I now know what to expect.

Thanks for the explanation and the help.

Roy Matson

Noram Engineering