fipcore_img FipCore

   Configuration File

The station configuration file is used to setup the FIP context of your device. It must be called by the fipcore_init_network function.

The structure of this file is based on XML format.


XML CODE: XML file configuration skeleton of a FIP node (station)
<?xml version="1.0" encoding="utf-8"?>
    <StationConfiguration version="1.0">
        <SubscriberName>...</SubscriberName>
        <SubscriberNumber>...</SubscriberNumber>
        <Speed>...</Speed>
        <TSlot>...</TSlot>
        <Silence>...</Silence>
        <TurnAround>...</TurnAround>
        <FrameType>...</FrameType>
        <BusArbiter enabled="...">
            <BAMaxSubscriberNumber>...</BAMaxSubscriberNumber>
            <BAPriority>...</BAPriority>
            <BAMaxPriority>...</BAMaxPriority>
            <BAOptimization>...</BAOptimization>
            <BAScanTable number="...">
                <SEND_ID_DAT>...</SEND_ID_DAT>
                <SEND_ID_MSG>...</SEND_ID_MSG>
                <SEND_MSG>...</SEND_MSG>
                <SEND_APER>...</SEND_APER>
                <SUSPEND delay="...">...</SUSPEND>
                <WAIT_TIME>...</WAIT_TIME>
                <WAIT_SYNC>...</WAIT_SYNC>
                <TESTP>...</TESTP>
                <NEXT_MACRO>...</NEXT_MACRO>
            </BAScanTable>
        </BusArbiter>
        <Variables>
            <Variable>
                <Name>...</Name>
                <ID>...</ID>
                <PDU>...</PDU>
                <Length>...</Length>
                <Type>...</Type>
                <Refreshment period="..."  type="...">...</Refreshment>
                <Promptness period="..."  type="...">...</Promptness>
                <AperiodicService requestEnabled="...">...</AperiodicService>
                <MessagingService emissionEnabled="..." emissionChannel="..." receptionEnabled="...">
                    ...
                </MessagingService>
            </Variable>
        </Variables>
        <Messages>
            <Message>
                <Name>...</Name>
                <SourceID>...</SourceID>
                <SourceSegment>...</SourceSegment>
                <DestinationID>...</DestinationID>
                <DestinationSegment>...</DestinationSegment>
                <Type>...</Type>
            </Message>
        </Messages>
        <Tags>
            <Tag>
                <TagName>...</TagName>
                <TagId>...</TagId>
                <TypeName>...</TypeName>
                <AccessRights>...</AccessRights>
                <Description>...</Description>
                <Identifier>...</Identifier>
                <StartBit>...</StartBit>
                <StopBit>...</StopBit>
                <Endianness>...</Endianness>
            </Tag>
        </Tags>
    </StationConfiguration>


XML CODE: Minimal definition of a FIP node (station)
<?xml version="1.0" encoding="utf-8"?>
    <StationConfiguration version="1.0">
        <SubscriberName>Station 0 - Hangar A</SubscriberName>
        <SubscriberNumber>0x00</SubscriberNumber>
        <Speed>0x01</Speed>
        <TSlot>0x00</TSlot>
        <Silence>0x1e</Silence>
        <TurnAround>0x2d</TurnAround>
        <FrameType>WorldFIP</FrameType>
    </StationConfiguration>

We will now explain the different XML tags.

<StationConfiguration>

Description
This tag is the XML file root.
Parent
None
Type
Node Tag
Value
None
Attributes
version:
Version number of the XML configuration file.

<SubscriberName>

Description
Name of the FIP station.
Parent
<StationConfiguration>
Type
Leaf Tag
Value
String
Attributes
None

<SubscriberNumber>

Description
Address of the FIP station.
Parent
<StationConfiguration>
Type
Leaf Tag
Value
Numeric
This value is comprised between 0 [0x00] and 255 [0xFF].
Attributes
None

<Speed>

Description
Bit rate of the FIP network.
Parent
<StationConfiguration>
Type
Leaf Tag
Value
Numeric
0 : 31.25 Kbps
1 : 1 Mbps
2 : 2.5 Mbps
3 : 5 Mbps
Attributes
None

<TSlot>

Description
The Time Slot is the unit of time used as a basis for all time calculations inside your device.
<TSlot> tag allows to select the Time Slot between 4 values (0, 1, 2, 3).
This tag depends on the <Speed> tag.
Parent
<StationConfiguration>
Type
Leaf Tag
Value
Numeric

at 31.25 Kbps :
0 : Time Slot = 100 μs
1 : Time Slot = 400 μs
2 : Time Slot = 1 000 μs
3 : Time Slot = 4 000 μs

at 1 Mbps :
0 : Time Slot = 62.5 μs
1 : Time Slot = 250 μs
2 : Time Slot = 625 μs
3 : Time Slot = 2 500 μs

at 2.5 Mbps or 5 Mbps :
0 : Time Slot = 50 μs
1 : Time Slot = 200 μs
2 : Time Slot = 500 μs
3 : Time Slot = 2 000 μs
Attributes
None

<Silence>

Description
This tag is used to calculate line silence timeout T0.
It depends on the bit rate of your network.

How to calculate T0 (μs) ?

T0 = <Silence> * Ct1 +/- (0.25 * Tbit)
where
at 31.25 Kbps :
Ct1 = 1024 , Tbit = 32 μs
at 1 Mbps :
Ct1 = 5 , Tbit = 1 μs
at 2.5 Mbps :
Ct1 = 4 , Tbit = 0.4 μs
at 5 Mbps :
Ct1 = 4 , Tbit = 0.2 μs
Parent
<StationConfiguration>
Type
Leaf Tag
Value
Numeric
This value is comprised between 0 [0x00] and 63 [0x3F].

Recommended values :

at 31.25 Kbps - FIP/WorldFIP
Default Value :
4 [0x04] => T0 = 4 096 μs
Min Value :
4 [0x04] => T0 = 4 096 μs
Max Value :
63 [0x3F] => T0 = 64 512 μs

at 1 Mbps - FIP/WorldFIP
Default Value :
30 [0x1E] => T0 = 150 μs
Min Value :
27 [0x1B] => T0 = 135 μs
Max Value :
63 [0x3F] => T0 = 315 μs

at 1 Mbps - SlowFIP
Default Value :
58 [0x3A] => T0 = 290 μs

at 2.5 Mbps - FIP/WorldFIP
Default Value :
24 [0x18] => T0 = 96 μs
Min Value :
24 [0x18] => T0 = 96 μs
Max Value :
63 [0x3F] => T0 = 252 μs

at 5 Mbps - FIP/WorldFIP
Default Value :
23 [0x17] => T0 = 92 μs
Min Value :
23 [0x17] => T0 = 92 μs
Max Value :
63 [0x3F] => T0 = 252 μs

NOTE: The values given on the Default Value are the times recommended for interconnecting with all devices that meet the WorldFIP standard. The Min/Max Value are available to the user if he wishes to change the line interface performance in his own application.
Attributes
None

<TurnAround>

Description
This tag is used to set the minimum station turn-around time TrsP when sending.
It depends on the bit rate of your network.

How to calculate TrsP (μs) ?

TrsP = <TurnAround> * Ct2 + (1.25 * Tbit) +/- (0.25 * Tbit)
where
at 31.25 Kbps :
Ct2 = 128 , Tbit = 32 μs
at 1 Mbps :
Ct2 = 0.625 , Tbit = 1 μs
at 2.5 Mbps :
Ct2 = 0.5 , Tbit = 0.4 μs
at 5 Mbps :
Ct2 = 0.5 , Tbit = 0.2 μs
Parent
<StationConfiguration>
Type
Leaf Tag
Value
Numeric
This value is comprised between 0 [0x00] and 63 [0x3F].

Recommended values :

at 31.25 Kbps - FIP/WorldFIP
Default Value :
3 [0x03] => TrsP = 424 μs
Min Value :
3 [0x03] => TrsP = 424 μs
Max Value :
63 [0x3F] => TrsP = 8 104 μs

at 1 Mbps - FIP/WorldFIP
Default Value :
45 [0x2D] => TrsP = 29.375 μs
Min Value :
45 [0x2D] => TrsP = 29.375 μs
Max Value :
63 [0x3F] => TrsP = 40.625 μs

at 1 Mbps - SlowFIP
Default Value :
63 [0x3F] => TrsP = 40.625 μs

at 2.5 Mbps - FIP/WorldFIP
Default Value :
26 [0x1A] => TrsP = 14.65 μs
Min Value :
26 [0x1A] => TrsP = 14.65 μs
Max Value :
63 [0x3F] => TrsP = 33.15 μs

at 5 Mbps - FIP/WorldFIP
Default Value :
63 [0x3F] => TrsP = 31.75 μs

NOTE: The values given on the Default Value are the times recommended for interconnecting with all devices that meet the WorldFIP standard. The Min/Max Value are available to the user if he wishes to change the line interface performance in his own application.
Attributes
None

<FrameType>

Description
This tag defines the characteristics for network use.
Parent
<StationConfiguration>
Type
Leaf Tag
Value
String

FIP :
FIP network (CRC and NFC format frame)
WorldFIP :
WorldFIP network (CRC and IEC format frame)
SlowFIP :
FIP network + Interoperability with FIPCODE v4.3 and FIPCODE v5.3
Attributes
None

<BusArbiter>

Description
This tag defines the configuration section of the bus arbiter.
Parent
<StationConfiguration>
Type
Node Tag
Value
None
Attributes
enabled : true / false

This parameter allows to load or not the configuration of the bus arbiter in the device.

<Variables>

Description
This node tag defines the section for the FIP variables definition.
This section may contain up to 4096 variable definitions (See <Variable>).
Parent
<StationConfiguration>
Type
Node Tag
Value
None
Attributes
None

<Messages>

Description
This node tag defines the section for the FIP messages definition.
Parent
<StationConfiguration>
Type
Node Tag
Value
None
Attributes
None

<Tags>

Description
This node tag defines the section for the FIP tags definition.
Parent
<StationConfiguration>
Type
Node Tag
Value
None
Attributes
None

<BAMaxSubscriberNumber>

Description
Address of the last FIP station connectable to network.
Parent
<BusArbiter>
Type
Leaf Tag
Value
Numeric
This value is comprised between 0 [0x00] and 255 [0xFF].
Attributes
None

<BAPriority>

Description
Priority level of the bus arbiter.
Parent
<BusArbiter>
Type
Leaf Tag
Value
Numeric
This value is comprised between 0 [0x00] and 15 [0x0F].
0 is the highest priority.
Attributes
None

<BAMaxPriority>

Description
The highest bus arbiter priority level on the network.
Parent
<BusArbiter>
Type
Leaf Tag
Value
Numeric
This value is comprised between 0 [0x00] and 15 [0x0F].
0 is the highest priority.
Attributes
None

<BAOptimization>

Description
This tag is used to calculate Start Time and Election Time of the bus arbiter.

Start Time = T0 (Silence in μs) * BA_Start_Time
Election Time = T0 (Silence in μs) * BA_Election_Time

There are 4 formulas to calculate these times :


NOTE: BA_Start_Time and BA_Election_Time parameters may be changed later with fipcore_change_param_ba function.
Parent
<BusArbiter>
Type
Leaf Tag
Value
String
OPTIMIZATION_0
OPTIMIZATION_1
OPTIMIZATION_2
OPTIMIZATION_3
Attributes
None

<BAScanTable>

Description
This tag defines the configuration section of a scan table. A station configuration file may have 2 scan tables.
Parent
<BusArbiter>
Type
Node Tag
Value
None
Attributes
number : 1 or 2

<SEND_ID_DAT>

Description
Bus arbiter instruction used to send an ID_DAT identifier during a periodic scanning window.
Parent
<BAScanTable>
Type
Leaf Tag
Value
Numeric
This value is comprised between 0 [0x0000] and 65 535 [0xFFFF].
Attributes
None

<SEND_ID_MSG>

Description
Bus arbiter instruction used to send an ID_MSG identifier during a periodic scanning window.
Parent
<BAScanTable>
Type
Leaf Tag
Value
Numeric
This value is comprised between 0 [0x0000] and 65 535 [0xFFFF].
Attributes
None

<SEND_MSG>

Description
Bus arbiter instruction used to request the opening of a window in order to process aperiodic messaging requests. Window closing time is specified by parameter Value, expressed as a multiple of the Tslot time.
Parent
<BAScanTable>
Type
Leaf Tag
Value
Numeric
This value is comprised between 0 [0x0000] and 62 767 [0x7FFF].
It's a time slot multiple.
Attributes
None

<SEND_APER>

Description
Bus arbiter instruction used to request the opening of a window in order to process urgent and normal aperiodic variable requests. Window closing time is specified by parameter Value, expressed as a multiple of the Tslot time.
Parent
<BAScanTable>
Type
Leaf Tag
Value
Numeric
This value is comprised between 0 [0x0000] and 62 767 [0x7FFF].
It's a time slot multiple.
Attributes
None

<SUSPEND>

Description
This BA instruction puts the bus arbiter in a state where it is waiting for a program execution resumption order from the user. Resumption can be carried out on the current program or on another program. If the monitoring timeout associated with this instruction expires, the BA activates its suspension procedure and switches to BA_STOPPED status.

NOTE: This instruction is used if the user handles the subscriber presence test.
Parent
<BAScanTable>
Type
Leaf Tag
Value
Numeric
This value represents the event number associated with this instruction.
It must be comprised between 0 [0x00] and 255 [0xFF].
Attributes
delay
This value is comprised between 0 [0x0000] and 62 767 [0x7FFF].
It's a time slot multiple.

<WAIT_TIME>

Description
Internal synchronization request. The bus arbiter sends “jam” identifiers until the specified time is over. Using the instruction allows you to synchronize execution of the BA program and ensures a set macro-cycle duration.
Parent
<BAScanTable>
Type
Leaf Tag
Value
Numeric
This value is comprised between 0 [0x0000] and 62 767 [0x7FFF].
It's a time slot multiple.
Attributes
None

<WAIT_SYNC>

Description
External synchronization request. The bus arbiter sends “jam” identifiers until the user requests resumption. If no resumption request is recorded before window closing time, the bus arbiter begins its suspension procedure.
Parent
<BAScanTable>
Type
Leaf Tag
Value
Numeric
This value is comprised between 0 [0x0000] and 62 767 [0x7FFF].
It's a time slot multiple.
Attributes
None

<TESTP>

Description
This BA instruction runs the test for subscribers present on the network.

NOTE: This instruction is only usable if the hardware base is configured in New Mode.
WARNING: The Exoligent devices doesn't support New Mode for now.
Parent
<BAScanTable>
Type
Leaf Tag
Value
None
Attributes
None

<NEXT_MACRO>

Description
This BA instruction is the end of execution with return to starting address of current macro-cycle or connection to a new macro-cycle.
Parent
<BAScanTable>
Type
Leaf Tag
Value
None
Attributes
None

<Variable>

Description
This tag defines the configuration section of a variable.
Parent
<Variables>
Type
Node Tag
Value
None
Attributes
None

<Name>

Description
Variable name.
Parent
<Variable>
Type
Leaf Tag
Value
String
Attributes
None

<ID>

Description
Variable identifier.
Parent
<Variable>
Type
Leaf Tag
Value
Numeric
This value is comprised between 0 [0x0000] and 65 535 [0xFFFF].
Attributes
None

<PDU>

Description
Variable PDU.
Parent
<Variable>
Type
Leaf Tag
Value
Numeric

64 [0x40] : MPS variable (user variable)
80 [0x50] : SM-MPS variable (network management variable)
Attributes
None

<Length>

Description
Variable length (useful variable length without PDU, Length and Production Status bytes)
Parent
<Variable>
Type
Leaf Tag
Value
Numeric
This value is comprised between :
  • 1 [0x01] and 126 [0x7E] for a variable without refreshment.
  • 1 [0x01] and 125 [0x7D] for a variable with refreshment.
Attributes
None

<Type>

Description
This field defines if the variable is produced (OUT) or consumed (IN) by the FIP station.
Parent
<Variable>
Type
Leaf Tag
Value
Numeric
0 : OUT
1 : IN
Attributes
None

<Refreshment>

Description
This tag defines the refreshment of the variable.

NOTE: Refreshment relates to the validity of the value of a variable being made available to the network by a producer user. This validity is generated from a maximum production period set by the user. The status is generated the moment the variable is produced on the network. If the value of the status is true, the value of the variable has been updated within a period of time less than or equal to the specified production period.
WARNING: When the refreshment is set, a Production Status byte is included at the end of the FIP frame.
As a consequence, a FIP station that reads a variable has to know its refreshment configuration. So, the <Refreshment> tag must be defined for consumed (IN) and produced (OUT) variables.
The period attribute is not significant for a consumed (IN) variable.
Parent
<Variable>
Type
Leaf Tag
Value
None
Attributes
period :
This value is comprised between 1 [0x0001] and 16 383 [0x3FFF].
It's a time slot multiple.
type :
0 : Refreshment not required
1 : Refreshment required
2 : Dynamic refreshment required

<Promptness>

Description
This tag defines the promptness of the variable.

NOTE 1: Promptness relates to the validity of the value of a variable being made available to the user by the network. This validity is generated from a maximum consumption period set by the user. The status is generated the moment the variable is consumed (read) on the network. If the value of the status is true, the value of the variable has been updated within a period of time less than or equal to the specified consumption period.

NOTE 2: The <Promptness> tag is only significant for a consumed (IN) variable.
Parent
<Variable>
Type
Leaf Tag
Value
None
Attributes
period :
This value is comprised between 1 [0x0001] and 16 383 [0x3FFF].
It's a time slot multiple.
type :
0 : Promptness not required
1 : Promptness required

<AperiodicService>

Description
This tag allows to carry out MPS aperiodic requests using the identifier associated with that variable.

NOTE: The <AperiodicService> tag is only significant for a produced (OUT) variable.
Parent
<Variable>
Type
Leaf Tag
Value
None
Attributes
requestEnabled :
true : MPS aperiodic requests authorised
false : MPS apreriodic requests not authorised

<MessagingService>

Description
This tag allows to carry out messaging requests using identifier associated with that variable.
It can also authorize messages reception. So it is possible to receive any message whose two first bytes of the destination address field is equal to the identifier value of the associated variable.
Parent
<Variable>
Type
Leaf Tag
Value
None
Attributes
emissionEnabled :
true : Messaging requests authorized
false : Messaging requests not authorized
emissionChannel :
0 : Aperiodic channel
1 to 8 : Periodic channels
receptionEnabled :
true : Message reception authorized
false : Message reception not authorized

<Message>

Description
This tag defines the configuration section of a message.
Parent
<Messages>
Type
Node Tag
Value
None
Attributes
None

<Name>

Description
Message name.
Parent
<Message>
Type
Leaf Tag
Value
String
Attributes
None

<SourceID>

Description
Message source identifier.
Parent
<Message>
Type
Leaf Tag
Value
Numeric
This value is comprised between 0 [0x0000] and 65 535 [0xFFFF].
Attributes
None

<SourceSegment>

Description
Message source segment.
Parent
<Message>
Type
Leaf Tag
Value
Numeric
This value is comprised between 0 [0x00] and 255 [0xFF].
Attributes
None

<DestinationID>

Description
Message destination identifier.
Parent
<Message>
Type
Leaf Tag
Value
Numeric
This value is comprised between 0 [0x0000] and 65 535 [0xFFFF].
Attributes
None

<DestinationSegment>

Description
Message destination segment.
Parent
<Message>
Type
Leaf Tag
Value
Numeric
This value is comprised between 0 [0x00] and 255 [0xFF].
Attributes
None

<Type>

Description
Message direction.
Parent
<Message>
Type
Leaf Tag
Value
String
toSend : Message to transmit
toReceive : Message to receive

WARNING: To receive a message, you have to configure in the station at least one variable (IN or OUT) with the <MessagingService> attributes:
receptionEnabled : true
Attributes
emissionChannel :
0 : Aperiodic channel
1 to 8 : Periodic channel

ackRequestEnabled :
true : Message with acknowledgment request
false : Message without acknowledgment request

NOTE: The above attributes are only meaningful for messages configured for transmission.

WARNING:
To send a periodic message, you have to configure in the station at least one produced (OUT) variable with the <MessagingService> attributes:
emissionEnabled : true
emissionChannel : between 1 and 8

To send an aperiodic message, you have to configure in the station at least one produced (OUT) variable with the <MessagingService> attributes:
emissionEnabled : true
emissionChannel : 0

<Tag>

Description
This tag defines the configuration section of a tag.
Parent
<Tags>
Type
Node Tag
Value
None
Attributes
None

<TagName>

Description
Name of the tag.
Parent
<Tag>
Type
Leaf Tag
Value
String
Attributes
None

<TagId>

Description
Tag identifier.
Parent
<Tag>
Type
Leaf Tag
Value
Numeric
This value is comprised between 0 [0x0000] and 65 535 [0xFFFF].
Attributes
None

<TypeName>

Description
Name of the tag type
Parent
<Tag>
Type
Leaf Tag
Value
String
Bool, UInt8, Int8, UInt16, Int16, UInt64, Int64, Float, ASCII, Hexa.
Attributes
None

<AccessRights>

Description
Access rights to the tag.
Parent
<Tag>
Type
Leaf Tag
Value
Numeric
0 : Read/Write
1 : Read only
Attributes
None

<Description>

Description
Tag description as unit, comments or other.
Parent
<Tag>
Type
Leaf Tag
Value
String
Attributes
None

<Identifier>

Description
FIP variable identifier. It's the attachment variable for the tag.
Parent
<Tag>
Type
Leaf Tag
Value
Numeric
This value is comprised between 0 [0x0000] and 65 535 [0xFFFF].
Attributes
None

<StartBit>

Description
Start bit for the tag in the FIP frame.
Parent
<Tag>
Type
Leaf Tag
Value
Numeric
Attributes
None

<StopBit>

Description
Stop bit for the tag in the FIP frame.
Parent
<Tag>
Type
Leaf Tag
Value
Numeric
Attributes
None

<Endianness>

Description
Tag endianness.
Parent
<Tag>
Type
Leaf Tag
Value
Numeric
-1 : not significant
0 : big-endian
1 : little-endian
Attributes
None