dakotap

controllogix cellular remote sites

29 posts in this topic

hello new here, first of all im no pro and a big noob but need some help if willing. I work at water treatment plant with a controllogix rack, we have 13 tank sites that we are trying to communicate to through sierra wireless rv50  cell modem with micro 820 controllers, most sites will just have pressure transducers for tank level. locally we cannot get any help setting this up. we have a modem for the plant connected to a en2t card in the controllogix chassis. we are setup through verizon have have static ip addresses . can someone please help walk me through getting this going. Thanks

Share this post


Link to post
Share on other sites

Couple of things- (1) How far are your tanks from the main processor? Cell modems come with a monthly cost. Freewave non-licensed radios don't. (2) What are you using to convert the "pressure" value to something meaningful, like feet and inches? Using a pressure transmitter for tank level is "economical" :/ 

Back to the cell modems, they have to be set up to specifically talk to the port that the AB PLC likes to talk on. I'm going to have to dig a little to find it but I made a Sierra Wireless cell modem setup PDF about 5 years ago. That's going to take a little effort. 

I can't help you with the Micro 820's. It would have been cheaper to use Point IO (unless there's more than just a tank level transmitter on each tank. Point IO is dirt cheap though) and the IO would live in the main PLC instead of having to kludge around with 13 tank PLC's plus the main PLC.

Edited by Michael Lloyd

Share this post


Link to post
Share on other sites

We already have the hardware we just can’t get it to mesh.. 

for instance 

the en2t port configuration settings ? The card is 192.168.1.55

the modem static ip is 63.40.219.224

portstart 44818 portstop 44818 host ip 192.168.1.50 port stop 44818

the micrologix for testing is 192.168.1.100

the modem static ip is 63.40.219.222

portstart 44818 port stop 44818 host ip 192.168.1.100 port start 44818

it will not show up in rslinx under the en2t card 

Share this post


Link to post
Share on other sites

Ya gotta eat an elephant one bite at a time.

the en2t port configuration settings ? The card is 192.168.1.55 ... ok... what's the subnet mask?

the modem static ip is 63.40.219.224 <--- So the EN2T is speaking English and you've basically set the modem, that I'm assuming is supposed to be connected to the PLC, to speak French... they've got to be on the same subnet... 

portstart 44818 portstop 44818 host ip 192.168.1.50 port stop 44818

-----------------------

This is what I would do (and have done). Set a static IP, Subnet Mask, and Default router in the EN2T

In your example above: IP: 192.168.1.55; Subnet mask: 255.255.255.0; Default Router: 1922.168.1.1

Now set the Modem up to be a DHCP server. IP: 192.168.1.10; Subnet mask: 255.255.255.0; Default Router: 1922.168.1.1. Now when you plug the laptop into the switch the modem will put our laptop on the LAN that you are building. You are using a switch right? The modem isn't plugged directly into the EN2T correct?

Each cell modem will need to be (doesn't actually need to be, it just lets you plug your laptop into the switch and not have to worry about hard coding an IP address / subnet mask) a DHCP server. IP: 192.168.1.xx; Subnet mask: 255.255.255.0; Default Router: 1922.168.1.1 You'll increment the last octet (xx) for each tank site, so the last octet of the IP will be 11, 12, 13...23. 

44818 is the right port but what you wrote doesn't look like port forwarding to me. Granted it's been about 5 years since I've set a modem up and you may not even need port forwarding in this scenario. I'm away from work so I don't have any of my references handy. 

The main problem you have is that it appears that you're trying to talk across two different subnets. That never works. Never as in a router can be set up to NAT but that's above my skillset and not relevant to what you're doing here.

Share this post


Link to post
Share on other sites

Thanks for the replies ! I actually got it to Work after much frustration.. it had to do the gateway setting on the en2t and “device ip “ on the modems . They had to be set the same . It automatically popped up the micrologix into the tree after that ! We are getting everything switched to Verizon’s apn so it’s secure so that’s all the testing I’m doing right now considering it’s all gunna have to change cause right now we Have public static ip addresses... but in the mean time ... any advice on the logic? I’m guessing message instruction from the controllogix to the micro820? What about polling to minimize data useage? Keep in mind there will be 13 remote sites right now with expansion as we can for other things like pump stations. But for now it’s just gunna be water tank sites with a single 4-20ma transducer . Thanks again!! Lay it out basic cause I know enough to be dangerous but want to learn the right way to do things ! 

1 person likes this

Share this post


Link to post
Share on other sites

That's good news. Cell modems are not the easiest things to set up the first time. Consider adding the DHCP settings at the PLC. That'll make plugging in less of a hassle. A year from now you or someone else might not remember to hard code the IP / Subnet Mask in the laptop or pc.

Message. Definitely use the Message block. I'm home for Thanksgiving and I don't have my laptop here otherwise I would send you an example of what you are trying to do. One exception though,  I was messaging between two CLX machines (Control Logix) not the Micro. It's supposed to work the same. If you initiate the message from the CLX machine then once you get one working the rest should work.

One way to control the polling is to use a Periodic Task and set it to once a <insert time here>. Don't poll it too fast or it won't work. Try 1 second (1000ms) first. Inside of that create your 13 messages, one for each tank. Ethernet is fast. You should be able to just use 13 separate rungs, each with its own message block, for no more data than you're trying to get. I have about a half dozen different messages traveling across a couple hundred miles of pipeline and I run them. It's important to get the IP address structure right in the Message block. xxx.xxx.xxx.xxx,a,b,c where the x's are the IP address octets for the target and the rest are commands. Caveat- the example may be completely out of order. 

Here's one more thing to consider. If all of your hair is pulled out and you can't get the message to work in the CLX, try switching to writing from each Micro back to the CLX with a message in the micro.

I don't like what they are doing here. It's too kludgy... but it's from AB: https://literature.rockwellautomation.com/idc/groups/literature/documents/pm/1756-pm012_-en-p.pdf

This is way better. I didn't use his timer. I used a Periodic Task: http://bryceautomation.com/index.php/2017/06/03/controllogix-messaging/

Share this post


Link to post
Share on other sites

I have never been interest in learning networking but I guess now I should probably learn the terminology. Ugh! Thank you for the replies and taking time to help me. There’s a lot of info out there but having someone hear your situation puts my mind at ease that I’m trying to learn the right thing to do for my application. I guess for now I could just hook up a Ethernet cord from the controllogix to micro to play around with this ? I even have some transducers I could hook up temporarily I just need a resistor . 

Share this post


Link to post
Share on other sites

Definitely- hook up an ethernet cable and get it talking that way. You'll be ahead of the game!

Networking at this level isn't too complicated. Subnetting isn't that hard. There are plenty of websites out there that will tell you how to subnet an IP. BUT, "router people", aka IT folks, need the a few of the first IP addresses to do their stuff with so I usually offset 9 addresses. By that I mean if the router is xxx.xxx.xxx.1 then my first address is xxx.xxx.xxx.10.  Subnet 255.255.255.0 is wide open, literally all of the addresses in the subnet are available. That's the simplest but least efficient use of addresses. Ive been abbreviating... it's called a subnet mask. 255 decimal is b11111111 (binary 11111111). On the other hand .0 is b00000000. Masking another number with all ones lets the number pass thru unmolested. Masking with all zeros makes the result 0. The following website does a really good job of explaining subnet masking. You don't really need to understand it but if you do you're ahead of some competitors. 

https://support.microsoft.com/en-us/help/164015/understanding-tcp-ip-addressing-and-subnetting-basics

In your current situation you could probably go with a 255.255.255.224 subnet mask. You'll get 32 addresses (the router, if there was one, starts at 1) out of that. Bear in mind that it's not just the last octet that can be masked.

Handy table: https://dnsmadeeasy.com/support/subnet/

For clarity, an octet is the xxx. I've been typing. That just means a 3 digit number up to and including 255 (because that is b11111111). There are 4 octets to an IP address and subnet mask.

What you need to know is pretty easy to wrap your head around. 

 

Share this post


Link to post
Share on other sites

Okay so here’s the latest . I’m trying to send a periodic msg to read a tag in the micro 820. 
I can see the micro 820 in rslinx but not in studio 5000. 
I keep getting a communication error when I click on the msg instruction while everything running. Obviously I’m not seeing the data. 
 

Share this post


Link to post
Share on other sites

I’ve read and tried all the manual path combinations I have seen but still won’t do it 

Share this post


Link to post
Share on other sites

Do you have a way to set up a test bed with just a cat 5 cable and switch between each PLC? The cell modem's have their own config trickery (port forwarding) that you need to do. Eliminate that and try PLC to PLC with a small LAN. Once you know that you can message between PLC's reintroduce the cellular LAN. 

Quote

I can see the micro 820 in rslinx but not in studio 5000. 

You won't see it in Studio 5000. If your network is solid you'll see all of the PLC's in RSLinx (or at least be able to ping them).

Take heart, you're not attempting an entry level bit of logic. Comm can be a challenge. 

Share this post


Link to post
Share on other sites

thank you very much sir . I shall report back after tomorrow .I felt accomplished just getting ccw downloaded and connected . it’s way different than studio 5000 I hate it . But I’m going to do all the scaling in the controllogix and just get the raw value from the 820 . So I have like one rung of logic on the 820 and that’s just a “any to real”  to name it “upper_glade_raw” . Sound right ? Seemed to simple lol I hooked up a 0-10v generator and it my values changed (0-4095) but it just seemed like that was way to easy. 

Share this post


Link to post
Share on other sites

Okay so I connected my 820 in the ethernet card the cell modem normally connects to.. and had to change the tag in the 820 to a “globally defined “ tag . And it works, I adjust my generator and the value goes up and down as it should in the controllogix .. when I try to go through the cell modems ... nothing . Still feels nice to get that far though. Any suggestions? Thanks for the patience! 

1 person likes this

Share this post


Link to post
Share on other sites
4 minutes ago, dakotap said:

Okay so I connected my 820 in the ethernet card the cell modem normally connects to.. and had to change the tag in the 820 to a “globally defined “ tag . And it works, I adjust my generator and the value goes up and down as it should in the controllogix .. when I try to go through the cell modems ... nothing . Still feels nice to get that far though. Any suggestions? Thanks for the patience! 

Good catch. I "never" use anything but globally defined. Never like I might someday but so far there's been no need

That's huge. You've narrowed it down to the modem. Your Message is correct for a direct connection. I'm going to reach out to some coworkers this morning. They have more recent experience with cell modems. Cell modem config can be tedious. It'll have something to do with the port forwarding. I know that we used 44818 and 80 (for modbus devices) but it's been a while so I need to check with some people that have done it recently.

Share this post


Link to post
Share on other sites

If it helps when the message is running the error text is “ connection failure “ 

error code “16#0001” 

Share this post


Link to post
Share on other sites

Okay so I switched the IP address in my path and it works!!! I was putting the up address of the micro820 .. I switched it to the IP address of the cell modem for the micro 820 and boom working !!! 

1 person likes this

Share this post


Link to post
Share on other sites
1 hour ago, dakotap said:

Okay so I switched the IP address in my path and it works!!! I was putting the up address of the micro820 .. I switched it to the IP address of the cell modem for the micro 820 and boom working !!! 

PERFECT!!! That's the missing piece that I came back to tell you about. You figured out for yourself! Nothing sticks in you mind better than that. Well done!!

Share this post


Link to post
Share on other sites

Okay so here’s the latest I figuered I would keep this in this thread Incase anyone else in a similar situation. 
Another remote site a booster station 

will have 4 analog values to read 

couple relay inputs and relay outputs for pump control. 
again a micro 820 

is there a way to get the data packed into one message ? What’s the best way. I know this is basic but you have been a ton of help to me!! . We will just control off of time example- pump run 6am to 6pm . Very basic setup 

Share this post


Link to post
Share on other sites

To Go Further into detail analog inputs will be

pump1 psi -pump2 psi- suction psi - flow gpm 

how do you put those into an array? 
same with the  relay input/outputs ? Those would be consider bools right ? 

Share this post


Link to post
Share on other sites

Look for User Defined. It's on the left, a couple of sections below the programs and above the processor / IO sheet (going off memory). This only works if you have UDT's on the Micro. I think they do but I basically hate their software enough that I don't use them. 

Create a UDT with the structure that you want. Give it a short name that makes sense. You can't use names that are already in the AB tag structure. Just as an example you could call it RmtIO. Keep the first column in the UDT simple but usable.

Don't do: Pump Suction #1 for the West Reflux Pump, in the first column. Instead do: S1 or AI1 and make the type Real if you're moving floating point values (10.6582) vs INT (11)

BOOL is correct for DI/DO

Make the structure a little larger than you need. In your case, use all of the AI's if it's a small count. Same with the DI's:

AI1 FLOAT (or INT)

AI2 etc 

AI3 etc

AI4 etc

DI1 BOOL

DI2 etc

DI3 etc
DI4 etc

DO1 BOOL if needed or desired

DO2 etc
DO3 etc

DO4 etc

You can always get wordy in the Description of the tag later (and you should). If you put a Description in the UDT more often than not it won't work for every instance of the UDT. 

Now create a tag that makes sense, Station number for instance (like if there's a pump number called P-101, call it Stn101, of the type RmtIO <-- this shows up in the type dropdown. That will create a tag array. Inside of it you'll have your mixed IO in the order that it is in the UDT. Like this Stn101.AI1; Stn101.AI2, etc. Notice what is to the right of the "dot". A nice short reference and a nice short tag structure. A couple of letters more wouldn't seem to make a difference but if you have to type this tag in HMI software for a 1,000 IO point program you will quickly realize that letter count adds up and time is money. You make it up in the description. There's a way to make that easy too. More later.

You need to create this UDT and tag in every device so if the Micro doesn't allow UDT's this won't work. In message you should be able to move Stn101 to Stn101. Test it in one before you do a bunch of work in all of them

UDT's are your friend (too). I'll try to send a better example later today.

Share this post


Link to post
Share on other sites

So do I need to create two different udt’s one for things I want to control from the controllogix like ,hand Bit , auto bit, and time comparisons. And then read only udt like run status , overload status , analog values from the remote site ? 

Share this post


Link to post
Share on other sites

Think of the UDT as a tag structure or container. Ie once you have a UDT you can create a bunch of tags of the type you name the UDT. Book, real, int are all “types”

Share this post


Link to post
Share on other sites

So it doesn’t matter to read or write all the “tags” ?Example I have a udt setup called Sophia_booster with

pump auto -bool

pump hand -bool

Discharge psi -real 

flow gpm -real 

 

I only want to write the pump auto and pump hand bool’s from the controllogix because the other values Im reading from the other processor’s analog inputs  so what happens if I send the message ? 

Share this post


Link to post
Share on other sites

You can write but do you want to?

You'll want to move, copy, or use structured text (my favorite) the IO point data to the tag data and then read the new tag with the message

Here's an example (real life) of discrete IO mapping using structured text. You can also use ladder. --||----( ) where the contact is the Local:blahblah tag and the coil is the leftmost tag.

// Booster Pump Motor IO Mapping

P2050.Stop_I := Local:3:I.Data.9;
P2050.Start_I := Local:3:I.Data.10;
P2050.RunStat := Local:3:I.Data.11;
Local:6:O.Data.0 := P2050.Run;

The UDT is attached

Motor.L5X

Share this post


Link to post
Share on other sites

I’m confused now. So I’m not going to use the Cip data table read/write message to get the data back and forth ? 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now