NRAO Home  >  Green Bank  |  Wiki Topic:    GB > Knowledge > HowToInstallConfigCCUModbusIF (r1.1 vs. r1.5)
   Readme | Changes | Index | Search | Go
 <<O>>  Difference Topic HowToInstallConfigCCUModbusIF (r1.5 - 01 Nov 2007 - JoeBrandt)
Changed:
<
<

>
>

TOC: No TOC in "Knowledge.HowToInstallConfigCCUModbusIF"


Changed:
<
<

The modbus server expects to find the IP address of the PLC in the 'other flags' field of the boot parameters. The address should be in dotted notation (e.g. 172.23.1.41). If the 'bring up other interfaces option is also used, then the field should first contain the interface, then a colon, followed by the PLC address. (e.g. ei:172.23.1.41)

>
>

The modbus server expects to find the IP address of the PLC in the 'other flags' field of the boot parameters. The address should be in dotted notation (e.g. 172.23.1.62). If the 'bring up other interfaces option is also used, then the field should first contain the interface, then a colon, followed by the PLC address. (e.g. ei:172.23.1.62)

Deleted:
<
<

Changed:
<
<

boot device :

>
>

boot device : ei0

Changed:
<
<

host name : file name : inet on ethernet (e) : 172.23.1.136:ffff0000

>
>

host name : none <===Note this field cannot be blank file name : none <===Note this field cannot be blank inet on ethernet (e) : 172.23.1.136

Changed:
<
<

ftp password (pw) (blank = use rsh): t0rna60

>
>

ftp password (pw) (blank = use rsh): xxxxxxx

Changed:
<
<

target name (tn) : gbtaio2

>
>

target name (tn) : gbtaio1

Changed:
<
<

other (o) : 172.23.1.41

value = 0 = 0x0

>
>

other (o) : ei:172.23.1.62


 <<O>>  Difference Topic HowToInstallConfigCCUModbusIF (r1.4 - 31 Oct 2007 - JoeBrandt)
Added:
>
>

The PROM burner does not usually have a network connection or USB port, so grab a floppy (if you find one)

Changed:
<
<

The U1/U2 should follow the board silkscreen nomenclature. You can run a sanity check by examining what happens to the 'strings in t1.bin':

>
>

On linux, one can write a floppy like so:

  • mcopy ROM.U1 ROM.U2 a:
Changed:
<
<

start of data Copyright 1984-1992 Wind River Systems, Inc. This program contains confidential information of Wind River Systems, Inc. and disclosure and copying are prohibited.

>
>

(The following steps below are only if byte ordering is suspect.)
The U1/U2 should follow the board silkscreen nomenclature. You can run a sanity check by examining what happens to the strings in t1.bin.

  • strings t1.bin | more
Should produce something like: Copyright 1984-1994 Wind River Systems, Inc.

 <<O>>  Difference Topic HowToInstallConfigCCUModbusIF (r1.3 - 23 Oct 2007 - JoeBrandt)
Changed:
<
<

The page HowToMakeCCUPROMS may also be helpful to review. Note that the notes in this page assume a vxWorks version of 5.3 or 5.3.1.

>
>

The page HowToMakeCCUPROMS may also be helpful to review. Note that the notes on this page assume a vxWorks version of 5.3 or 5.3.1.

Changed:
<
<

>
>

  • cd /home/gbt1/GBTServo
Changed:
<
<

Note that removing top level .o files and 'cd-ing' into the mv167 subdirectory is important! Otherwise a set of 5.1 build rules may interfere.

>
>

Note that removing top level .o files and 'cd-ing' into the mv167 subdirectory is important! Otherwise a set of 5.1 build rules may interfere with the build, or actually attempt to link 5.1/5.3 code together. This will definitely cross the beams, and make you spend an afternoon contemplating a less technological way of life!

Changed:
<
<

Again the 'all' is important, as it will build both the modbusIF interface executable, and the ROM'able library version.

>
>

Note that the 'all' is important, as it will build both the modbusIF interface executable, and the ROM'able library version of the code.

Changed:
<
<

Next the vxWorks ROM image must be built. Unfortunately this currently must be done on a sparc-solaris machine.

>
>

Next the combined modbus server/vxWorks ROM image must be built. Unfortunately this currently must be done on a sparc-solaris machine. (This is not due to complier versions as much as it is that we don't have the correct host tools for linux builds.)

Added:
>
>

At this point you have a file vxWorks.st_rom.hex or bootrom.hex, which contains lots of hex numbers. This is a Motorola S-record format file, which we need to:

  • (a) make a binary file, and
  • (b) split the binary into upper and lower word hunks to put into ROMS.

Making the ROM Binary Images

(This is a step in which things can get very confusing, because of byte/word orientation issues. The Motorola 68040 and Sparc architectures are the same, but the ROM burner is a PC based device, so some pre-swapping is required. This may change as the tools and build host changes. I assume here a Sparc host is used for builds, and a x86 PC is used for PROM programming.)

Use the objcopy68k command to translate from Motorola S-records to binary:

  • objcopy68k -I srec -O binary vxWorks.st_rom.hex t1.bin

Note: You will get an error: "Output file cannot represent architecture UNKNOWN!" (ignore it)

The objcopy is a GNU program which can almost split the files, but not quite. We need to split 16bit words, which is not supported (in the version we have at least). I wrote a program called makeRoms which does this simple operation. (The source and binary is located in GBTServo/tools directory. It assumes a sparc host.) So now we can split our binary file into upper and lower 16 bit words. This could be straight-forward, but the ROM-burners we own are PC-oriented, so they end up byte swapping the ROM's. In order to fix this, the makeRoms program does one more pre-swap, to fix the problem.

  • ../../../../tools/makeRoms t1.bin ROM.U1 ROM.U2
Added:
>
>

The U1/U2 should follow the board silkscreen nomenclature. You can run a sanity check by examining what happens to the 'strings in t1.bin':

Added:
>
>

start of data Copyright 1984-1992 Wind River Systems, Inc. This program contains confidential information of Wind River Systems, Inc. and disclosure and copying are prohibited.

Added:
>
>

The way to read is 2 1 6 5 ... 4 3 8 7 ...

So after the makeROMS step it becomes:

ROM.U1: ts td a oCir t4899iWR resysmnIT sgo mtnsnnoedainimroifoniiR rts,scnnaidolerdnpognerorib.d

ROM.U2: rafota yphg911- 2dnviS et ,.cihrparociac iftn lofta nW devySmeI . dcsusa c iya p ihet

Added:
>
>

An example is shown below:

-> bootChange

'.' = clear field;  '-' = go to previous field;  ^D = quit

boot device          :
processor number     : 1
host name            : 
file name            : 
inet on ethernet (e) : 172.23.1.136:ffff0000
inet on backplane (b):
host inet (h)        : 
gateway inet (g)     :
user (u)             : wriver
ftp password (pw) (blank = use rsh): t0rna60
flags (f)            : 0x22
target name (tn)     : gbtaio2
startup script (s)   : 
other (o)            : 172.23.1.41

value = 0 = 0x0


 <<O>>  Difference Topic HowToInstallConfigCCUModbusIF (r1.2 - 23 Oct 2007 - JoeBrandt)
Changed:
<
<

The page HowToMakeCCUPROMS may also be helpful to review.

>
>

The page HowToMakeCCUPROMS may also be helpful to review. Note that the notes in this page assume a vxWorks version of 5.3 or 5.3.1.

Changed:
<
<

  • LIB_EXTRA += ../../../../source/modbussccu/mv167-vxworks/rom_modbus.ro
Check to see that config.h has INCLUDE_NRAO_MODBUS defined.
>
>

  • ADDED_MODULES += ../../../../source/modbussccu/mv167-vxworks/rom_modbus.ro
Also check to see that config.h has INCLUDE_NRAO_MODBUS defined.

 <<O>>  Difference Topic HowToInstallConfigCCUModbusIF (r1.1 - 22 Oct 2007 - JoeBrandt)
Added:
>
>

%META:TOPICINFO{author="JoeBrandt" date="1193089014" format="1.0" version="1.1"}% %META:TOPICPARENT{name="MnCKnowledge"}%

Configuring the Modbus CCU-Aux Software

Building the ROM Image

The page HowToMakeCCUPROMS may also be helpful to review.

To setup an environment for building the GBT servo from source, execute (assuming a bash session on a linux host):

  • source ./Profile 5.3

Make sure that the sccu code is built, because the modbus links with a couple of the sccu files:

  • cd source/sccu
  • rm *.o
  • cd mv167-vxworks
  • make

Note that removing top level .o files and 'cd-ing' into the mv167 subdirectory is important! Otherwise a set of 5.1 build rules may interfere.

Next build the modbus software:

  • setup as if you are building normal M&C code
  • cd source/modbussccu/mv167-vxworks
  • make all

Again the 'all' is important, as it will build both the modbusIF interface executable, and the ROM'able library version.

Next the vxWorks ROM image must be built. Unfortunately this currently must be done on a sparc-solaris machine.

  • ssh arcturus
  • cd /home/gbt1/GBTServo
  • source Profile 5.3
  • cd vxWorks5.3/target/config/mv167

Check to see that the following line is uncommented in the Makefile:

  • LIB_EXTRA += ../../../../source/modbussccu/mv167-vxworks/rom_modbus.ro
Check to see that config.h has INCLUDE_NRAO_MODBUS defined.

Now create the ROM IMAGE:

  • make vxWorks.st_rom.hex

Boot Parameters and PLC Network Address

The modbus server expects to find the IP address of the PLC in the 'other flags' field of the boot parameters. The address should be in dotted notation (e.g. 172.23.1.41). If the 'bring up other interfaces option is also used, then the field should first contain the interface, then a colon, followed by the PLC address. (e.g. ei:172.23.1.41)

-- JoeBrandt - 22 Oct 2007 %META:FORM{name="WebForm"}% %META:FIELD{name="TopicClassification" title="TopicClassification" value="NoDisclosure"}% %META:FIELD{name="OperatingSystem" title="OperatingSystem" value=""}% %META:FIELD{name="OsVersion" title="OsVersion" value=""}%


Topic HowToInstallConfigCCUModbusIF . { View | Diffs | r1.5 | > | r1.4 | > | r1.3 | More }
Revision r1.1 - 22 Oct 2007 - 21:36 GMT - JoeBrandt
Revision r1.5 - 01 Nov 2007 - 20:38 GMT - JoeBrandt
Content copyright © 1999-2007 by the contributing authors.
All material on this collaboration platform is the property of the contributing authors.