Software Library API naibrd 1.62
See all documentation at naii.docs.com
|
Functions | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_PB_BusParamReconfiguration (int32_t cardIndex, int32_t module, int32_t busParam, int32_t field1Value, int32_t field2Value) |
Responsible for allowing for the modification of 3 bus values: Setting a new Master State, a new highest active address or new min slave interval values. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_PB_SetAndEnableMaxCycleCounter (int32_t cardIndex, int32_t module, int32_t maxCycleCount) |
Sets the number of data cycles that will take place prior to the bus being placed offline. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_PB_StartReconfiguration (int32_t cardIndex, int32_t module, int32_t startReconfig) |
Responsible for kicking off the reconfiguration process. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_PB_SetPollCycleMode (int32_t cardIndex, int32_t module, int32_t pollCycleMode) |
Specifies if the poll cycle is Asynchronous or Synchronous. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_PB_SetBusParams (int32_t cardIndex, int32_t module, NAIBRD_PB_BUS_PARAMS *p_busParams) |
Responsible for configuring the bus with new parameter values. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_PB_SetNewIOConfig (int32_t cardIndex, int32_t module, int32_t slaveAddr, int32_t cfgDataLength, int8_t *p_cfgData) |
Assigns a new IO configuration. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_PB_SetDynamicBusParams (int32_t cardIndex, int32_t module, int32_t stationAddr, int32_t maxRetryLimit, int32_t tSlot, int32_t maxTsdr) |
Responsible for performing a "bump-free" alteration of the bus parameters during operation. Thus parameters can be optimized while operation is going on. This function must be used with care since communication errors may occur if wrong bus parameters have been selected. The profibus DP application receives no feedback about successful alteration of bus parameters nor about invalid data. Any invalid bus parameters are ignored and no changes will be performed. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_PB_SetSystemTime (int32_t cardIndex, int32_t module, uint32_t clockStatus, uint32_t sysTimeSeconds, uint32_t sysTimeNanoSeconds) |
A new reference time is passed to the PROFIBUS-DP Master configured as the time master. This reference time is then automatically distributed in the system. If there is a time master with a lower station address on the bus, it will assume the responsibility for time synchronization, and the PROFIBUS-DP Protocol Software will change to the time slave mode. In this case, the setting of a new system time by the PROFIBUS-DP Application is ignored and the system time of the current time master is used. In case the latter should fail, the PROFIBUS-DP Protocol Software changes back to the time master mode. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_PB_SetPowerEnableForSegments (int32_t cardIndex, int32_t module, uint32_t powerEnable) |
Responsible for turning on the power supplies for the segments. Segments 1 - 8 share 4 power supplies. Segments 1 and 2 are powered by 1 power supply, Segments 2 and 4 by another and so on. The Aux segment is powered by its own power supply. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_PB_SetTerminationEnableForSegments (int32_t cardIndex, int32_t module, uint32_t terminationEnable) |
Responsible for turning on/off termination for each segment. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_PB_SetReceiverEnableForSegments (int32_t cardIndex, int32_t module, uint32_t receiverEnable) |
Responsible for turning on/off receiver for each segment. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_PB_EnableSegmentForUse (int32_t cardIndex, int32_t module, int32_t segment, bool_t enable) |
This method enables a given segment for use which encompasses making sure the power supply tied to the segment is powered and the receiver for the given segment is on. NOTE: because the normal segments (all but Aux) each share a power supply with one other segment, when disabling a segment for use the power supply will not turn off when disabling a single segment. If conservation of power is needed, extra calls can be made to naibrd_PB_SetPowerEnableForSegments where banks of segments (2 segments per bank) can be turned off. For the Aux segment, power will be disabled when disabling the segment since the Aux segment has its own power supply. Valid Segments: 1, 2, 3, 4, 5, 6, 7, 8 and 0xFF for Aux. | |
NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_BusParamReconfiguration | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | busParam, | ||
int32_t | field1Value, | ||
int32_t | field2Value ) |
Responsible for allowing for the modification of 3 bus values: Setting a new Master State, a new highest active address or new min slave interval values.
cardIndex | : (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1). |
module | : (Input) Module Number of the module to access (1 - [max modules for board]). |
busParam | : (Input) Parameter to be reconfigured
|
field1Value | : (Input)
|
field2Value | : (Input)
|
NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_EnableSegmentForUse | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | segment, | ||
bool_t | enable ) |
This method enables a given segment for use which encompasses making sure the power supply tied to the segment is powered and the receiver for the given segment is on. NOTE: because the normal segments (all but Aux) each share a power supply with one other segment, when disabling a segment for use the power supply will not turn off when disabling a single segment. If conservation of power is needed, extra calls can be made to naibrd_PB_SetPowerEnableForSegments where banks of segments (2 segments per bank) can be turned off. For the Aux segment, power will be disabled when disabling the segment since the Aux segment has its own power supply. Valid Segments: 1, 2, 3, 4, 5, 6, 7, 8 and 0xFF for Aux.
cardIndex | : (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1). |
module | : (Input) Module Number of the module to access (1 - [max modules for board]). |
segment | : (Input) Segment number (1 - 8) or 0xFF (255) for Aug Segment |
enable | : (Input) True to enable segment, False to disable |
NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_SetAndEnableMaxCycleCounter | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | maxCycleCount ) |
Sets the number of data cycles that will take place prior to the bus being placed offline.
cardIndex | : (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1). |
module | : (Input) Module Number of the module to access (1 - [max modules for board]). |
maxCycleCount | : (Input) Number of data cycles to be completed before the bus is placed offline |
NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_SetBusParams | ( | int32_t | cardIndex, |
int32_t | module, | ||
NAIBRD_PB_BUS_PARAMS * | p_busParams ) |
Responsible for configuring the bus with new parameter values.
cardIndex | : (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1). |
module | : (Input) Module Number of the module to access (1 - [max modules for board]). |
p_busParams | : (Input) Pointer to struct containing configurable bus parameters. See description of NAIBRD_PB_BUS_PARAMS in naibrd_pb.h |
NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_SetDynamicBusParams | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | stationAddr, | ||
int32_t | maxRetryLimit, | ||
int32_t | tSlot, | ||
int32_t | maxTsdr ) |
Responsible for performing a "bump-free" alteration of the bus parameters during operation. Thus parameters can be optimized while operation is going on. This function must be used with care since communication errors may occur if wrong bus parameters have been selected. The profibus DP application receives no feedback about successful alteration of bus parameters nor about invalid data. Any invalid bus parameters are ignored and no changes will be performed.
cardIndex | : (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1). |
module | : (Input) Module Number of the module to access (1 - [max modules for board]). |
stationAddr | : (Input) Specifies the station address of the PROFIBUS-DP Master in the bus system. |
maxRetryLimit | : (Input) The maximum number of frame repetitions indicates how often, after the end of the slot time, the PROFIBUS-DP Master will repeat a request before marking the responder as "not reachable" |
tSlot | : (Input) Slot time is the maximum time that the master (requester/initiator) has to wait for the first byte of either the responseor a frame from the token receiver after a token exchange. |
maxTsdr | : (Input) The maxTsdr is the time after which the sink must have processed a request and sent a response, if applicable, i.e. the waiting time of the master after an unacknowledged request. The valid range lies between 37 and 65535 |
NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_SetNewIOConfig | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | slaveAddr, | ||
int32_t | cfgDataLength, | ||
int8_t * | p_cfgData ) |
Assigns a new IO configuration.
cardIndex | : (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1). |
module | : (Input) Module Number of the module to access (1 - [max modules for board]). |
slaveAddr | : (Input) Address of target slave |
cfgDataLength | : (Input) Length (count of bytes) of configuration data being sent |
p_cfgData | : (Input) pointer to buffer of configuration bytes |
NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_SetPollCycleMode | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | pollCycleMode ) |
Specifies if the poll cycle is Asynchronous or Synchronous.
cardIndex | : (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1). |
module | : (Input) Module Number of the module to access (1 - [max modules for board]). |
pollCycleMode | : (Input) 0 = Asynchronous poll cycle mode; 1 = Synchronous poll cycle mode NOTE: Asynchronous poll cycle mode is a free running polling cycle without synchronicity with the application - only controlled by the configured minimum slave interval. Synchronous poll cycle mode - the application controls the start of the new polling cycle. This, however, may not violate the configured minimum slave interval. This mode is not possible if isochronous data is configured. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_SetPowerEnableForSegments | ( | int32_t | cardIndex, |
int32_t | module, | ||
uint32_t | powerEnable ) |
Responsible for turning on the power supplies for the segments. Segments 1 - 8 share 4 power supplies. Segments 1 and 2 are powered by 1 power supply, Segments 2 and 4 by another and so on. The Aux segment is powered by its own power supply.
cardIndex | : (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1). |
module | : (Input) Module Number of the module to access (1 - [max modules for board]). |
powerEnable | : (Input) Specifies which segments will be powered.
|
NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_SetReceiverEnableForSegments | ( | int32_t | cardIndex, |
int32_t | module, | ||
uint32_t | receiverEnable ) |
Responsible for turning on/off receiver for each segment.
cardIndex | : (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1). |
module | : (Input) Module Number of the module to access (1 - [max modules for board]). |
receiverEnable | : (Input) Specifies which segments will have receivers enabled.
|
NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_SetSystemTime | ( | int32_t | cardIndex, |
int32_t | module, | ||
uint32_t | clockStatus, | ||
uint32_t | sysTimeSeconds, | ||
uint32_t | sysTimeNanoSeconds ) |
A new reference time is passed to the PROFIBUS-DP Master configured as the time master. This reference time is then automatically distributed in the system. If there is a time master with a lower station address on the bus, it will assume the responsibility for time synchronization, and the PROFIBUS-DP Protocol Software will change to the time slave mode. In this case, the setting of a new system time by the PROFIBUS-DP Application is ignored and the system time of the current time master is used. In case the latter should fail, the PROFIBUS-DP Protocol Software changes back to the time master mode.
cardIndex | : (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1). |
module | : (Input) Module Number of the module to access (1 - [max modules for board]). |
clockStatus | : (Input) Contains the resolution, the time zone, the daylight saving time adjustment and status information supplied to the PROFIBUS-DP Protocol Software. For available bit options that can be logically OR'ed together see naibrd_pb.h |
sysTimeSeconds | : (Input) Specifies the current second according to UTC; 0 corresponds to 01/01/1900 |
sysTimeNanoSeconds | : (Input) Specifies the current nanosecond in multiples of 232 picoseconds |
NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_SetTerminationEnableForSegments | ( | int32_t | cardIndex, |
int32_t | module, | ||
uint32_t | terminationEnable ) |
Responsible for turning on/off termination for each segment.
cardIndex | : (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1). |
module | : (Input) Module Number of the module to access (1 - [max modules for board]). |
terminationEnable | : (Input) Specifies which segments will be terminated.
|
NAIBRDFUNC nai_status_t NAIAPI naibrd_PB_StartReconfiguration | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | startReconfig ) |
Responsible for kicking off the reconfiguration process.
cardIndex | : (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1). |
module | : (Input) Module Number of the module to access (1 - [max modules for board]). |
startReconfig | : (Input) Value 0x01 starts reconfiguration. Any other value passed will not start reconfiguration |