0% found this document useful (0 votes)
57 views8 pages

Hardware Configuration

The document describes the hardware configuration process for a PSR controller system. It involves editing a configuration file called Confmana.CFM to define the project structure, controllers, tasks, domains and signal groups. Syntax for the configuration file is defined using EBNF notation. Errors encountered during code generation are logged in a file called PTSCONFM.LOG.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views8 pages

Hardware Configuration

The document describes the hardware configuration process for a PSR controller system. It involves editing a configuration file called Confmana.CFM to define the project structure, controllers, tasks, domains and signal groups. Syntax for the configuration file is defined using EBNF notation. Errors encountered during code generation are logged in a file called PTSCONFM.LOG.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

PSR-How to use FUPLA 2 / 10.

Hardware Configuration 118

10. Hardware Configuration

10.1 Introduction

Before generating the code the hardware information must be added to the database. A hardware description
file named Confmana.CFM contains this information. You have to use the FUP/ALS Editor first, to build your
application program. Then you have to adapt the Confmana.CFM configuration file to your hardware. Finally
you have to generate the code for one or more controllers and download it to the hardware with the Loader.
You may use the integrated editor in the Shell or any other suitable ASCII text editor to edit the configuration
file. Use the "Edit Confmana.CFM" item of the "TextEdit" menu section of the Shell after you have selected
the desired editor to edit the project structure. See the section 10.2 of this chapter for further details about
the project structure and the section 10.3 for the EBNF rules and the syntax description.
If syntax and semantic are correct, the database is modified, otherwise the program ends with an error
message consisting of an error code and an explanatory text. The error code is calculated (errorNumber :=
modId * 64 + error number). For modId and error number see section 10.6. If an error is detected use the
editor to correct and retry to generate the code. There is also an error log file called "PTSCONFM.LOG"
which contains the description of the occurred errors.

10.2 Edit Project Structure

The top down project structure could be divided as follows: the project name, the buses, controllers, the tasks
and the domains. (This is done by editing the text file "Confmana.CFM".)
Begin the project structure by defining a valid project name followed by the required buses with their
controller names.
Describe the controller by the processor name, the controller descriptor, the predefined task names with the
task structure and the predefined domain names with the domain structure. You can also specify the
controller specific parameters such as parity, clock rate and versions in the controller description part.
Describe the task structure by defining the tasks you wish to run on the PSR controller, by creating a host
task list for each controller. The host task list must specify the predefined task names, the list of cluster
names with their segment in the order they should be processed for each FUP/ALS task. You can assign
different clusters to different tasks. This will allow you to run time critical parts of your application in tasks with
shorter cycle times (clock rate), and non-critical parts of the application in tasks with longer cycle times (clock
rate).
The user memory is divided into domains. The self explanatory names of the domains are fixed and could not
be changed. Under each domain, the signal group with all individual FUP/ALS signals are listed. You can
assign different signal groups to different domains as you wish.
The address range of each domain is defined by POSSIBLEBASE <hexBase> and POSSIBLESIZE
<HexSize>, each signal group by BASE <hexBase> and SIZE <HexSize> and finally a signal by OFFSET
<hexOffset> and BIT <hexBit>.

10.3 Syntax Description

10.3.1 EBNF of the Configuration File

The Syntax is described in EBNF (Extended Backus Naur Form). The rules are as follows:
- All keywords are enclosed in apostrophes.
- Non-keywords begin with a capital letter.
- The words in brackets (<>) are explained in section 10.4.2.
- Metasymbols of the EBNF notation:
{ } The contents of the curly brackets may be repeated. The number of repetitions is without any limit
(0..infinity).
[ ] The contents of the square brackets is optional.

Rev.: 4.0 (2001.05) 3BHS 120511 E


PSR-How to use FUPLA 2 / 10. Hardware Configuration 119

( | ) The vertical line is the separator between the different options. Exactly one of the options must be
selected.
{ | } None, one, some or all of the options may be selected and in any order.
The ; character marks the beginnings of comments. Comments end automatically at the end of lines.
digit = '0'|'1'|'2'|'3'|'4'|'5'|'6'|'7'|'8'|'9'
hexDigit = digit |'A'|'B'|'C'|'D'|'E'|'F'
hexLongInt = hexDigit hexDigit hexDigit hexDigit
hexDigit hexDigit hexDigit hexDigit 'H'
hexWord = hexDigit hexDigit hexDigit hexDigit 'H'
hexByte = hexDigit hexDigit 'H'
hexNibble = hexDigit 'H'
ProjectDesc = "PROJECT"
<projectName> BusDesc
"ENDPROJECT"
BusDesc = "BUS" <busName> PhscDesc
{ <busName> PhscDesc }
"ENDBUS"
PhscDesc = "PHSC" | "PSR" <phscName>
[ ControllerDesc ] TaskDesc
DomainDesc
{ <phscName>
[ ControllerDesc ] TaskDesc
DomainDesc }
"ENDPHSC"
TaskDesc = "TASK"
["BACKGROUND" [TaskCodeDesc] ClusterDesc]
["INTERRUPT0" [TaskCodeDesc] ClusterDesc]
["INTERRUPT1" [TaskCodeDesc] ClusterDesc]
["INTERRUPT2" [TaskCodeDesc] ClusterDesc]
["INTERRUPT3" [TaskCodeDesc] ClusterDesc]
["INTERRUPT4" [TaskCodeDesc] ClusterDesc]
["INTERRUPT5" [TaskCodeDesc] ClusterDesc]
["INTERRUPT6" [TaskCodeDesc] ClusterDesc]
["INTERRUPT7" [TaskCodeDesc] ClusterDesc]
["INIT" [TaskCodeDesc] ClusterDesc]
"ENDTASK"

This option is only for authorised persons !


TaskCodeDesc = [ "CodeBase" <hexLongInt> ]
[ "CodeSize" <hexLongInt> ]
ClusterDesc = "CLUSTER" <clusterName> SegmentDesc (Note
1)
{ <clusterName> SegmentDesc}
"ENDCLUSTER"
SegmentDesc = "SEGMENT" <segmentName>
{ <segmentName> }
"ENDSEGMENT"

Rev.: 4.0 (2001.05) 3BHS 120511 E


PSR-How to use FUPLA 2 / 10. Hardware Configuration 120

ControllerDesc = [ "DeviceAddress" < hexByte > ]


[ "Timer 0" < cardinal > ] (Note
2)
[ "Timer 1" < cardinal > ] (Note
2)
[ "local Link Address" < hexByte > ]
[ "Prom Identnumber HB" < string15 > ]
[ "Prom Identnumber MB" < string15 > ]
[ "Prom Identnumber LB" < string15 > ]
[ "Prom Identnumber SA" < string15 > ]
DomainDesc = "DOMAIN"
[ "CODEMEMORY" [ PossibleRange ]
[ UsedRange ]
"ENDCODEMEMORY" ]
[ "DATAMEMORY" [ PossibleRange ]
{<signalGroupName>}
"ENDDATAMEMORY" ]
[ "SAVEMEMORY" [ PossibleRange ]
{"LOCALPARAMETER"
<ClusterName> <SignalName> "VALUE" <ParamValue>
{<ClusterName> <SignalName> "VALUE" <ParamValue>}
"ENDLOCALPARAMETER"}
{"GLOBALPARAMETER"
<signalGroupName> <SignalName> GlobalParamDesc
{<signalGroupName> <SignalName> GlobalParamDesc}
"ENDGLOBALPARAMETER"}
"ENDSAVEMEMORY" ]
[ "MAILBOXLONG" [ PossibleRange ]
{ SigGrpDesc }
"ENDMAILBOXLONG" ]
[ "MAILBOXSHORT" [ PossibleRange ] (Note
3)
{ SigGrpDesc }
"ENDMAILBOXSHORT" ]
[ "BUSLONGIO" [ PossibleRange ]
{ SigGrpDesc }
"ENDBUSLONGIO" ]
[ "BUSSHORTIO" [ PossibleRange ]
{ SigGrpDesc }
"ENDBUSSHORTIO" ]
"ENDDOMAIN"
PossibleRange= [ "POSSIBLEBASE" <hexLongInt> ] [ "POSSIBLESIZE" <hexLongInt> ]

This option is only for authorised persons!


UsedRange = [ "USEDBASE" <hexLongInt> ] [ "USEDSIZE" <hexLongInt> ]
GlobalParamDesc = ( "VALUE" <ParamValue> | "OFFSET" <hexWord> ["BIT" <hexNibble>] |
"VALUE" <ParamValue> "OFFSET" <hexWord> ["BIT" <hexNibble>] )
SigGrpDesc = <signalGroupName> SigGrpRange SignalDesc
{ <signalGroupName> SigGrpRange SignalDesc }
SigGrpRange = "BASE" <hexLongInt> "SIZE" <hexLongInt> (Note
4)

SignalDesc = "SIGNAL" <signalName> "OFFSET" <hexWord> ["BIT" <hexNibble>]


{ <signalName> "OFFSET" <hexWord> ["BIT" <hexNibble>]}
"ENDSIGNAL"

Rev.: 4.0 (2001.05) 3BHS 120511 E


PSR-How to use FUPLA 2 / 10. Hardware Configuration 121

NOTES:
(1) The Code Generator does not accept cluster names with "/", "<" or ">".
(2) The configuration of "Timer 0" and "Timer 1" must follow the "Device Address" otherwise an error occurs.
(3) "POSSIBLESIZE" must be one of these: 4H, 8H, 10H, 20H, 40H, 80H, 100H, 200H, 400H,
"POSSIBLEBASE" divided by "POSSIBLESIZE" must have zero remainder
(4) The minimum value of "SIZE" must be equal to the highest offset plus 1. e. g.
MAILBOXSHORT POSSIBLEBASE 00000180H POSSIBLESIZE 00000080H
SigGrp BASE 00000180H SIZE 00000008H
SIGNAL
Sig1 OFFSET 0001H
Sig2 OFFSET 0005H
Sig3 OFFSET 0007H
ENDSIGNAL
ENDMAILBOXSHORT
Here the highest offset is 0007H, therefore, the "SIZE" is set to 0008H.

10.3.2 EBNF Description

You should write the keywords PROJECT, BUS, PHSC, TASK, CLUSTER, SEGMENT etc. and the END..
exactly as they are shown above and in the given order. The words in brackets (<>) are explained below.
<projectName> uniquely identifies the project (e.g. "HighNoon", "DEMO"). It must be a valid file name with 8
or fewer characters and must match the project database (<projectname>.ER).
<busName> uniquely identifies the target bus. It must be a valid file name with 8 or fewer characters.
<phscName> uniquely identifies the target processor. It must be a valid file name with 8 or fewer characters.
<clusterName> must be the cluster name of a FUP/ALS program. It must be a name with 16 or fewer
characters, defined in Editor.
<segmentName> must be the segment name of a FUP/ALS program. It must be a name with 16 or fewer
characters, defined in Editor.
<signalGroupName> must be the name of the FUP/ALS signal group to which the signal belongs. It can be
as many as 8 characters long. The FUPLA 2 tools distinguish between upper and lower case characters
in the FUP/ALS signal group names (e.g. SIGGRP, SigGrp and siggrp are different signal group names).
Global parameters which have been given fix addresses under SAVEMEMORY must also be defined
under DATAMEMORY.
<signalName> is the FUP/ALS signal name. It can be as many as 16 characters long. The FUPLA 2 tools
distinguish between upper and lower case characters in the FUP/ALS signal names.
POSSIBLEBASE <hexLongInt> is the base address of the FUP/ALS domain. The base address for each
domain is limited by the controller hardware. It must be 8 hex characters long, followed by the hex
marker 'H'. If POSSIBLEBASE <hexLongInt> is not specified, <hexLongInt> is set to its default value.
POSSIBLESIZE <hexLongInt> is the address range of the FUP/ALS domain. The address range for each
domain is limited by the controller hardware. It must be 8 hex characters long, followed by the hex
marker 'H'. If POSSIBLESIZE <hexLongInt> is not specified, <hexLongInt> is set to its default value.
USEDBASE <hexLongInt> is the base address of the controller configuration code within the
CODEMEMORY domain. The base address for the controller configuration code is limited by the
controller hardware and software. It must be 8 hex characters long, followed by the hex marker 'H'. If
USEDBASE <hexLongInt> is not specified, <hexLongInt> is set to its default value. This option is only for
IAE internal usage or authorised persons.
USEDSIZE <hexLongInt> is the address range of the controller configuration code within the
CODEMEMORY domain. The address range for the controller configuration code is limited by the
controller hardware and software. It must be 8 hex characters long, followed by the hex marker 'H'. If
USEDSIZE <hexLongInt> is not specified, <hexLongInt> is set to 00000110H. This option is only for IAE
internal usage or authorised persons.

Rev.: 4.0 (2001.05) 3BHS 120511 E


PSR-How to use FUPLA 2 / 10. Hardware Configuration 122

CodeBase <hexLongInt> is the base address of a specific controller's task code image within the
CODEMEMORY domain. The base address for each controller task code image is limited by the
controller hardware and software. It must be 8 hex characters long, followed by the hex marker 'H'. If
CodeBase <hexLongInt> is not specified, it remains unchanged.
CodeSize <hexLongInt> is the address range of a specific controller's task code image within the
CODEMEMORY domain. The address range for each controller task code image is limited by the
controller software. It must be 8 hex characters long, followed by the hex marker 'H'. If CodeSize
<hexLongInt> is not specified, it remains unchanged.
For the controller types PP B022 CE and PP C022 AE the CODEMEMORY size must be set to 32 KByte
in the "Confmana.CFM" file, just after DATAMEMORY. e. g.
CODEMEMORY POSSIBLEBASE 00000000H POSSIBLESIZE 00007FFFH
ENDCODEMEMORY
For the controller type PP B022 BE the CODEMEMORY size must be set to 8 KByte. e. g.
CODEMEMORY POSSIBLEBASE 00000000H POSSIBLESIZE 00001FFFH
ENDCODEMEMORY
BASE <hexLongInt> is the base address of the FUP/ALS signal group. It must be 8 hex characters long,
followed by the hex marker 'H'.
SIZE <hexLongInt> is the address range of the FUP/ALS signal group. It must be 8 hex characters long,
followed by the hex marker 'H'.
OFFSET <hexWord> is the offset address of the FUP/ALS signal. It must be 4 hex characters long, followed
by the hex marker 'H'.
BIT <hexNibble> is the bit address of a Boolean FUP/ALS signal. It must be one hex character long followed
by the hex marker 'H'. If BIT <hexNibble> is not specified, <hexNibble> is set to 0H.
<ParamValue> is the value of the declared parameter. Its data type must be in conform with the FUPLA 2
data type described in the Appendix E.

10.3.3 Default Values for the ControllerDesc

Default value Range


"DeviceAddress" 01H 0h .. 0FFh
"Timer 0" 1000 0 .. 65535
"Timer 1" 5000 0 .. 65535
"local Link Address" 10H 0h .. 0FFh
"Prom Identnumber HB" 'HIEExxxxxxRxxxx'
"Prom Identnumber MB" 'HIEExxxxxxRxxxx'
"Prom Identnumber LB" 'HIEExxxxxxRxxxx'
"Prom Identnumber SA" 'HIEExxxxxxRxxxx'

10.3.4 Ranges and Default Values for the Controller Domains

Range "POSSIBLEBASE" "POSSIBLESIZE"


<hexLongInt> .. <hexLongInt> <hexLongInt> <hexLongInt>
"DATAMEMORY" 00001000H .. 00007FFFH 00001000H 00007000H
"SAVEMEMORY" 00000000H .. 00000FFFH 00000000H 00000FFFH
"MAILBOXLONG" 00000500H .. 000013FFH 00000500H 00000F00H
"MAILBOXSHORT" 00000000H .. 000003FFH 00000300H 00000100H
"BUSLONGIO" 00000000H .. 00FFFFFFH 00000000H 01000000H
"BUSSHORTIO" 00000000H .. 000003FFH 00000000H 00000400H
"CODEMEMORY" 00000000H .. 00001FFFH 00000000H 00001FFFH

"USEDBASE" "USEDSIZE"
<hexLongInt> <hexLongInt>
"CODEMEMORY" 00000000H 00000110H

Rev.: 4.0 (2001.05) 3BHS 120511 E


PSR-How to use FUPLA 2 / 10. Hardware Configuration 123

10.4 Calculation of Absolute Addresses

The absolute addresses in all domains, except MAILBOXLONG, are calculated by


Absolute Address = SigGrpDesc BASE + SignalDesc OFFSET
In case of MAILBOXLONG the absolute addresses are calculated by
Absolute Address = 20'000H · GA + SigGrp BASE + Signal OFFSET
GA means the "geographical address" and is selected using the GA DIL switch on the PSR hardware.

10.5 Example of a Confmana.CFM File

; (C) COPYRIGHT 1994 by ABB Industrie AG


;
; PROJECT : FUPLA 2 Configuration Manager
;
; ABSTRACT: CONFMANA.CFM Example File
;
; See the chapter 'Code Generator' into the
; user manual 'How to Use FUPLA 2' for more information
;
; AUTHOR : 06-Mar-1991 UEE P. Hartmann V1
; MODIFIED: 31-Jan-1994 IAEE2 Marcel Meier Rel. 2.24 B4
; Comments modified. DeviceAddress added. CODEMEMORY added.
; MODIFIED: 28-Aug-1995 IAEG Merk Willi Rel. 2.25 B5
; Signals in SAVEMEMORY added.

PROJECT EXAMPLE
BUS
TESTBUS
PHSC
TESTPHSC
"DeviceAddress" 01H ;GA
"Timer 0" 270 ; micro seconds
"Timer 1" 1080 ; micro seconds
TASK
INIT
CLUSTER
START
SEGMENT
SIGNALISATION
ENDSEGMENT
ENDCLUSTER

BACKGROUND
CLUSTER
HIMI
SEGMENT
STARTMARK
INSPECT
SCOPE
STOPMARK
ENDSEGMENT
ENDCLUSTER

INTERRUPT4
CLUSTER
TEST
SEGMENT
DISPLAY
ENDSEGMENT
ENDCLUSTER
ENDTASK

DOMAIN
DATAMEMORY
ParamGrp

Rev.: 4.0 (2001.05) 3BHS 120511 E


PSR-How to use FUPLA 2 / 10. Hardware Configuration 124

Signal
ENDDATAMEMORY

; 32K EEPROM for PP B022 CE


CODEMEMORY POSSIBLEBASE 00000000H POSSIBLESIZE 00007FFFH

; 8K EEPROM for PP B022 BE


; CODEMEMORY POSSIBLEBASE 00000000H POSSIBLESIZE 00001FFFH
ENDCODEMEMORY

SAVEMEMORY
LOCALPARAMETER
START Init-Value VALUE 0012H
ENDLOCALPARAMETER

GLOBALPARAMETER
ParamGrp Test OFFSET 0020H
ParamGrp Enable-Test VALUE 1B OFFSET 0021H BIT 1H
ParamGrp dummyParam-1 VALUE 0004H
ParamGrp dummyParam-2 VALUE 0005H
ENDGLOBALPARAMETER
ENDSAVEMEMORY

BUSSHORTIO
KombiI/O BASE 00000000H SIZE 00000020H
SIGNAL
DisplayAnalog OFFSET 0011H
Scope OFFSET 001AH
Init-ok OFFSET 0010H BIT FH
ENDSIGNAL
E/AModul BASE 00000020H SIZE 00000010H
SIGNAL
Data OFFSET 0009H
DisplayDigital OFFSET 000FH
address OFFSET 0008H
switch OFFSET 0000H
addrscope OFFSET 0001H
StartMark OFFSET 000BH BIT 0H
StopMark OFFSET 000BH BIT 0H
ENDSIGNAL
ENDBUSSHORTIO

BUSLONGIO
ENDBUSLONGIO

MAILBOXSHORT
ENDMAILBOXSHORT

MAILBOXLONG
ENDMAILBOXLONG
ENDDOMAIN
ENDPHSC
ENDBUS
ENDPROJECT

10.6 Error Messages

ERRORNUMBER MODULE modID errNr Errormessage


6401 ConfPars 100 01 'CONFMANA.CFM' open error
6402 ConfPars 100 02 'CONFMANA.CFM' close error
6403 ConfPars 100 03 'CONFMANA.CFM' read error
6405 ConfPars 100 05 Hex mark "H" is missing
6406 ConfPars 100 06 Invalid CARDINAL
6410 ConfPars 100 10 Invalid NUMBER
6411 ConfPars 100 11 "PROJECT" not found
6412 ConfPars 100 12 <projectName> expected

Rev.: 4.0 (2001.05) 3BHS 120511 E


PSR-How to use FUPLA 2 / 10. Hardware Configuration 125

6413 ConfPars 100 13 "ENDPROJECT" not expected


6414 ConfPars 100 14 "BUS" not found
6415 ConfPars 100 15 <busName> expected
6416 ConfPars 100 16 "ENDBUS" not expected
6417 ConfPars 100 17 "PHSC" not found
6418 ConfPars 100 18 <phscName> expected
6419 ConfPars 100 19 "ENDPHSC" not expected
6420 ConfPars 100 20 "TASK" not found
6421 ConfPars 100 21 <taskName> or ENDTASK expected
6423 ConfPars 100 23 Invalid <taskName> found
6424 ConfPars 100 24 "CLUSTER" not found
6425 ConfPars 100 25 <clusterName> expected
6426 ConfPars 100 26 "ENDCLUSTER" not expected
6427 ConfPars 100 27 "SEGMENT" not found
6428 ConfPars 100 28 <segmentName> expected
6429 ConfPars 100 29 "ENDSEGMENT" not expected
6430 ConfPars 100 30 "DOMAIN" not found
6431 ConfPars 100 31 <domainName> expected
6432 ConfPars 100 32 <domainName> is invalid
6433 ConfPars 100 33 "ENDCODEMEMORY" is expected
6434 ConfPars 100 34 "ENDSAVEMEMORY" is expected
6435 ConfPars 100 35 No more signal Groups allowed
6436 ConfPars 100 36 <signalGroupName> expected
6440 ConfPars 100 40 SIGNAL not found
6441 ConfPars 100 41 <signalName> expected
6442 ConfPars 100 42 ENDSIGNAL not expected
6450 ConfPars 100 50 Invalid Parity found
6451 ConfPars 100 51 signal OFFSET is bigger than signal group SIZE
6452 ConfPars 100 52 Cluster not found in DB
6453 ConfPars 100 53 Signal not found in DB
6454 ConfPars 100 54 Only parameter name expected
6455 ConfPars 100 55 Either local or global parameter is expected
6456 ConfPars 100 56 ENDLOCALPARAMETER is missing
6457 ConfPars 100 57 ENDGLOBALPARAMETER is missing
6458 ConfPars 100 58 Signal group not found in DB
6459 ConfPars 100 59 WriteSignalVar failed
6460 ConfPars 100 60 Invalid (wrong data type) parameter value
6461 ConfPars 100 61 Signal BIT is expected for boolean signals
6462 ConfPars 100 62 MailBoxLong base address < 500H
6463 ConfPars 100 63 MailBoxLong base address + size > 13FFH
6464 ConfPars 100 64 BUSSHORTIO size defined doesn't match
hardware
1281 ConfToDB 20 01 Writing to DB
1282 ConfToDB 20 02 Misspelt <projectName>
1283 ConfToDB 20 03 <clusterName> not found in DB
1284 ConfToDB 20 04 <segmentName> not found in DB
1285 ConfToDB 20 05 While <clusterName> is connect
1286 ConfToDB 20 06 Dispose Bus not done
1287 ConfToDB 20 07 Dispose PHSC not done
1288 ConfToDB 20 08 <busName> allready exists
1289 ConfToDB 20 09 <phscName> allready exists
1290 ConfToDB 20 10 Task of <taskName> not found
1291 ConfToDB 20 11 Domain of <domainName> not found
1292 ConfToDB 20 12 While <sigGrpName> is connect
1293 ConfToDB 20 13 <sigGrpName> not found in DB
1294 ConfToDB 20 14 Signal bit expected for boolean
1295 ConfToDB 20 15 Offset not expected for param and const

Rev.: 4.0 (2001.05) 3BHS 120511 E

You might also like