Programmatically set Red Lion IP address ?

Ken Roach

Lifetime Supporting Member + Moderator
Join Date
Apr 2002
Location
Seattle, WA
Posts
17,482
I have an application where I will be installing multiple Red Lion Data Station Plus units, which all run an almost-identical program.

Each unit must write to the same SLC-5/05 but put its data into a specific data register based on its identity. Unit 1 writes to N10:0, Unit 2 writes to N20:0... that sort of thing.

If I could programmatically set the IP address of the DSPSX using a program inside the Red Lion, then I could put identical user programs into each unit and save a human-readable configuration text file onto the CompactFlash card. Simplicity is important; this is going to a factory with no other Red Lion gear and a risk-averse maintenance staff.

But I can only see the GetNetIP() function, not a SetNetIP() function.

If the answer is "you need to create unique programs for each unit and put big shiny labels on the CF cards", that's OK. I was just hoping to make it very, very simple for the maintenance staff.
 
You assign a tag to the IP address field (preceded by an equal sign or drag and drop it).

The tag is a 32 bit integer, and can be an internal tag. If you need a human readable way to enter it, use the TextToAddr(String_Tag) system function to convert a String_Tag to an integer.

I did something similar for a system with 5 identical HMIs for water filters numbered 1 through 5. When you install it fresh, the IP address is set to a safe value for the network and it calls a page to enter the filter number. The entry becomes part of the 4th octet of the IP address and part of the text that appears in the header of each page of the graphics. In my case I also needed it to change the IP address for the main device it talks to using the DevCtrl() function. You won't need to do that if they all talk to the same PLC.

After changing the IP programmatically, you have to perform a CommitAndReset() function to get it to take effect. I would expect that all of this works exactly the same on a data station, but not 100% certain of that.
 
Last edited:
Ken the only way to get an IP address into the unit the first time is through the USB cable/port. You can change the IP address of a unit that's been running via ethernet but not establish the first one.

Of course on non-DSP units with touch panels you can set the initial IP address through the on-screen menu.

Loading from a CF card is another way to enable IP downloads. As a matter of fact, if the CF or SD card contains a valid image.ci3 file that is newer than what is in memory, it will load firmware and the whole application. EDIT: Since tag retentive data and log files will also be on that card, it is the most efficient and complete method of cloning an HMI (or DataStation) that I have encountered.
 
Last edited:
Since tag retentive data and log files will also be on that card, it is the most efficient and complete method of cloning an HMI (or DataStation) that I have encountered.

Are you sure about the retentive data? I'm not 100% certain but I seem to recollect that loading an image from the SD card does not replace the retentive data in the unit.
 
Paul, that is excellent information and advice.

I had tried dragging a string tag to the IP field, and it tried to tell me "this value must be an integer" but it didn't sink in what it meant.

I may still just make eight slightly-different "image.CI3" files and label the cards carefully, but now I know I have a chance at being really elegant.

Thank you !
 

Similar Topics

Hi all, I'm working with a bunch of 842E-M encoders. None of them are doing anything especially high speed/high accuracy, they're just helping me...
Replies
11
Views
3,989
I have a field device (flowmeter) using HART wired to a 200SP HART input card. I need to read flow totalization. Configuring the actual card to...
Replies
2
Views
611
MELSEQ "intelligent modules" configuration, programmatically resetting the CPU Hello. This is for the Mitsubishi experts, and thanks in advance...
Replies
5
Views
1,047
So instead of copying a bat file manually to a panelview plus during commissioning of a project, I would like to save the bat file into the...
Replies
5
Views
1,358
I'd like to have one of my displays tell what the firmware version is of the panelview that its running on without having to quit the application...
Replies
0
Views
593
Back
Top Bottom