Red Lion Communications

Old No. 7

Member
Join Date
Jun 2010
Location
Ohio
Posts
173
Is there a way in the G306 to use a tag to change the target address of the Allen Bradley DF1 protocol?

I'm trying to get to the point where AB or Crimson software is not required to change the IP addresses in the PLC (ML 1400) and HMI. I can change the IP address of the PLC through the LCD and I can change the HMI's IP address with a tag, but I don't believe that I can change the AB DF1 target IP address with a tag.

I'd also like to do the same thing with Modbus TCP/IP Master protocol.
 
I don't think this is possible in Crimson 2.0, but might be in Crimson 3.0. Let me look further into the software.

Joe_WaZoo
 
I'm gonna have to say that this is a No on Crimson 3.0. You can create a tag for the IP address of the HMI and change it, but it does not appear that we can assign a tag name to that of a DF1 slave or a ModbusTCP slave. So it looks like your best option would be to have the USB ports on the new V2 screens to boot a program change via a USB stick. That would allow you to have different programs to talk with different IP addresses. Maybe not the correct solution you are looking for but an idea that I throw out.

Thanks,
Joe_WaZoo
 
Thanks Joe. That's what I was afraid of. The problem is that we have no idea what the desired IP address our customer will want. It seems like if Red Lion can make the HMI address assignable to a tag they could make the protocol addresses assignable. Hopefully this is available in a future version. 🤞🏻
 
It's fairly easy to add a device control method to handle this. Let me have someone have a quick look tomorrow.
 
Setting the Device IP address for Modbus TCP is pretty easy. I had a project were I wanted our service techs to be able to move a G310 between two field devices that were similarly configured, but on totally different networks.

I configured it so that with the push of a button they could choose which network (building they were working in) and then on reboot (which is necessary to change the G310 IP address), the display would recognize the new network and choose between two tags that contained the Device IP addresses and the set the Device IP.

You seem to know how to set the HMI IP address so here is a sanitized version of the logic I put in a Startup() program:

CTRL_IP1 and CTRL_IP2 are String Type "Basic Tags"
G310_IP_ADDRESS is the String Tag that is used to set the HMI IP address
myController is the name of the Modbus TCP Device (you can use the name in DevCtrl rather than the Device Number)
Note: I found that if I do this in Startup, I need a delay before setting the Device IP Address.
Note2: This logic would work if you needed the user to set the IP address also. Just have them put the address in a regular string tag and use it instead of CTRL_IP1 or CTRL_IP2.

//CODE FOLLOWS

int Start = GetNow() + 8;

while(GetNow() < Start) Sleep(1000);

if (G310_IP_ADDRESS == TextToAddr(G310_IP1)) {
DevCtrl(myController,1,CTRL_IP1);
}
else {
DevCtrl(myController,1,CTRL_IP2);
}
//END CODE
 
Jim:

Sorry. Missed that.

Old No 7:

Please find below a link to a ZIP archive containing a modified downloadable driver file that I just got from one of our developers. Copy this into your DLDs\M68K directory under the Crimson 3.0 folder in Program Files. This will provide DevCtrl functionality for the DF1 driver, just as per the Modbus example that Jim described. Let us know if it works for you, and we'll make sure it gets into the build.

http://www.redlion.net/download/transfer/web/mikeg/3503.zip
 
Maybe I'm missing something here, but it doesn't look like I can drag any tag into the IP address field for a Modbus TCP/IP Master device. The only field that will accept a tag is the enable field.
 
Maybe I'm missing something here, but it doesn't look like I can drag any tag into the IP address field for a Modbus TCP/IP Master device. The only field that will accept a tag is the enable field.


No, you can't but you can do what you want to do by using my example.
 
That's right. You can't put a tag there, but you can use code similar to that posted by Jim to configure the driver dynamically via its DevCtrl function. The DLD I posted gives you this functionality on the DF1 driver, too. If you need some more details, PM me your email address and I'll have tech support walk you through it.
 
Thanks guys. One of our other engineers has been doing most of the work on this. I steer the ship, but he does all the paddling. :D He's out until next week, but I'll have him give it a try when he gets back.
 
Just used this with the latest build of Crimson 3.0 and it is awesome.

Now my HMI can connect to any of 14 different (nearly identical) machines with the touch of a button. The data on screen switches to the new IP address almost instantly too.

Since all of them are on the same subnet, I don't have to change the HMI address, only the Device address using the DevCtrl function, so rebooting is not required in my case.

At first I had my string tags containing the addresses set up with a String format template, but that messed me up and is unnecessary, since the values are fixed. I used a StartUp program to set their values.

My only remaining question on this is can I use a literal in the DevCtrl function for the IP address or must it be a String Tag?

Thanks,
Paul
 
To add on to this Thread - Is anyone aware of documentation anywhere for the specific capabilities of the DevCtrl function?
I am working on a raw TCP/IP driver right now, and trying to understand what capabilities I have to set IP, determine whether or not the Port is open/active, etc. . .

Thanks,
-Greg
 

Similar Topics

Hi all, I'm having a Red Lion DSPLE000 protocol converter on site to interface comms between an Allen Bradley L36ER CompactLogix, a S7-300 PLC...
Replies
0
Views
508
I've searched a bit about this topic but they are older threads that I suspect might not cover the tech that's available today. I have a client...
Replies
8
Views
4,923
I've got an encoder hooked up to a CUB5 and want to communicate with it from a G306A via RS232. I made two cables with pinouts per the G306A and...
Replies
3
Views
1,913
We just installed a new G315 on a piece of equipment after setting up our HMI via an additional test G315. Everything worked fine downloading the...
Replies
26
Views
28,238
I'm using a RedLion G3 with modules CSini8 and CSDIO14. It has a modem installed with an ATT sim card. A static IP address has been assigned. I...
Replies
10
Views
4,727
Back
Top Bottom