FipCore
Configuration File
Overview
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 CODE: Minimal definition of a FIP node (station)
We will now explain the different XML tags.
<StationConfiguration> Root
<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.
<StationConfiguration> Children
<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
- 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
- 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
<BusArbiter> Children
<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 :
-
- Optimization 0 : Calculation of timeouts as per standard
BA_Start_Time = 8712BA_Election_Time = 2 * (256 * (<BAPriority> + 1) + <SubscriberNumber> + 3)
- Optimization 1 : Acknowledgment of maximum number of network subscribers
BA_Start_Time = 2 * ((<BAMaxSubscriberNumber> + 1) * 16) + 257 + 3)BA_Election_Time = 2 * ((<BAMaxSubscriberNumber> + 1) * (<BAPriority> + 1) + <SubscriberNumber> + 3)
- Optimization 2 : Acknowledgment of maximum number of network subscribers and maximum priority
BA_Start_Time = 2 * ((<BAMaxSubscriberNumber> + 1) * (<BAMaxPriority> + 1)) + 257 + 3)BA_Election_Time = 2 * ((<BAMaxSubscriberNumber> + 1) * (<BAPriority> + 1) + <SubscriberNumber> + 3)
- Optimization 3 : Mono medium network (elimination of TESTP stuffing)
BA_Start_Time = 2 * ((<BAMaxSubscriberNumber> + 1) * (<BAMaxPriority> + 1)) + 3)BA_Election_Time = 2 * ((<BAMaxSubscriberNumber> + 1) * (<BAPriority> + 1) + <SubscriberNumber> + 3)
- Optimization 0 : Calculation of timeouts as per standard
-
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
<BAScanTable> Children
<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.
- 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.
- 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
<Variables> Children
<Variable>
- Description
- This tag defines the configuration section of a variable.
- Parent
- <Variables>
- Type
- Node Tag
- Value
- None
- Attributes
- None
<Variable> Children
<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.
- 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.
- 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
<Messages> Children
<Message>
- Description
- This tag defines the configuration section of a message.
- Parent
- <Messages>
- Type
- Node Tag
- Value
- None
- Attributes
- None
<Message> Children
<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
- Attributes
- emissionChannel :
- 0 : Aperiodic channel
- 1 to 8 : Periodic channel
- ackRequestEnabled :
- true : Message with acknowledgment request
- false : Message without acknowledgment request
WARNING:
To send a periodic message, you have to configure in the station at least one produced (OUT) variable with the <MessagingService> attributes:emissionEnabled : trueemissionChannel : 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 : trueemissionChannel : 0
<Tags> Children
<Tag>
- Description
- This tag defines the configuration section of a tag.
- Parent
- <Tags>
- Type
- Node Tag
- Value
- None
- Attributes
- None
<Tag> Children
<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