fipbusview_img FipBusView

   VIs

This section presents the VIs of the FipBusView library that are useful for communicating with a FIP device.

To see examples of how to use the library, please go to the Tutorial section.

FipBusView VIs

Figure: FipBusView VIs Panel

GET DEVICE CONF

GET DEVICE CONF VI

Description
This VI returns information about the target device.
Parameters
Input
device type
FIP arbitrator device type (see DEVICE TYPE).

device index
Device index comprised between 1 and 9.
Output
device configuration
Structure containing device information (see DEVICE CONF).

GET DEVICES NUMBER

GET DEVICE NUMBER VI

Description
This VI returns the number of FIP Arbitrator device on the machine.
Parameters
Input
NONE
Output
devices number
Number of FIP Arbitrator devices detected.

GET DEVICES LIST

GET DEVICE LIST VI

Description
This VI returns the number of FIP Arbitrator device on the machine and the information associated with it.
Parameters
Input
NONE
Output
devices number
Number of FIP Arbitrator devices detected.

devices configuration
Table of structures containing the information of detected devices (see DEVICE CONF).

DEVICE OPEN

DEVICE OPEN VI

Description
This VI starts the device and allocates the objects used internally by the library.
Parameters
Input
device type
FIP arbitrator device type (see DEVICE TYPE).

device index
Device index comprised between 1 and 9.
Output
card ID
Identifier attached to the open device.

DEVICE CLOSE

DEVICE CLOSE VI

Description
This VI stops the device and frees the objects used internally by the library.
Parameters
Input
card ID
Device identifier.
Output
NONE

GET RGB LED

GET RGB LED VI

Description
This VI reads the RGB led state of the device.
Parameters
Input
card ID
Device identifier.
Output
led state
RGB color (see RGB COLOR).

SET RGB LED

SET RGB LED VI

Description
This VI changes the RGB led color of the device.
Parameters
Input
card ID
Device identifier.

led state
RGB color (see RGB COLOR).
Output
NONE

IS REGISTERED DEVICE

IS REGISTERED DEVICE VI

Description
This VI tests the authorization of the device for a particular Exoligent software.
Parameters
Input
card ID
Device identifier.

soft type
Exoligent software to test (see SOFT TYPE).
Output
NONE

GET CONF

GET CONF VI

Description
This VI returns all the station configuration structure.
Parameters
Input
card ID
Device identifier.
Output
station configuration
Structure containing the station (FIP Node) information
see FIP STA CONF

GET VAR CONF BY ID

GET VAR CONF BY ID VI

Description
This VI returns the configuration structure for the FIP variable specified by its ID.
Parameters
Input
card ID
Device identifier.

identifier
Variable identifier.
Output
variable configuration
Structure containing the variable information
see FIP VAR CONF

GET VAR KEY BY ID

GET VAR KEY BY ID VI

Description
This VI returns the internal access key for the variable specified by its ID.
Parameters
Input
card ID
Device identifier.

identifier
Variable identifier.

direction
Direction (0 : OUT, 1 : IN).
Output
access key
Variable Access Key.

GET VAR ID BY KEY

GET VAR ID BY KEY VI

Description
This VI returns the variable ID specified by its internal access key.

Note : This VI is useful for processing event parameter of the READ EVT VI.
Parameters
Input
card ID
Device identifier.

access key
Variable Access Key.
Output
identifier
Variable ID.

direction
Direction (0 : OUT, 1 : IN).

GET MSG CONF BY HEADER

GET MSG CONF BY HEADER VI

Description
This VI returns the configuration structure for the FIP message specified by its header.
Parameters
Input
card ID
Device identifier.

destination ID
FIP destination ID.

destination Segment
FIP destination segment.

source ID
FIP source ID.

source Segment
FIP source segment.
Output
message configuration
Structure containing the message information
see FIP MSG CONF

GET TAG CONF BY ID

GET TAG CONF BY ID VI

Description
This VI returns the configuration structure for the tag specified by its ID.
Parameters
Input
card ID
Device identifier.

tag ID
Tag identifier.
Output
tag configuration
Structure containing the tag information
see FIP TAG CONF

GET TAG CONF BY NAME

GET TAG CONF BY NAME VI

Description
This VI returns the configuration structure for the tag specified by its name.
Parameters
Input
card ID
Device identifier.

tag name
Tag name.
Output
tag configuration
Structure containing the tag information
see FIP TAG CONF

INIT NETWORK

INIT NETWORK VI

Description
This VI downloads the FIP station configuration file to the device. The file contains the FIP network parameters, the variables and the messages.
Parameters
Input
card ID
Device identifier.

xml file path
Path to FIP station configuration file.

NOTE: To make this file, please refer to FipCore - Station Configuration File section.
Output
Refnums
FIP callbacks.

START NETWORK

START NETWORK VI

Description
This VI starts the communication with the FIP network.
Parameters
Input
card ID
Device identifier.
Output
NONE

STOP NETWORK

STOP NETWORK VI

Description
This VI stops the communication with the FIP network. Then it unloads FIP station configuration from the device.
Parameters
Input
card ID
Device identifier.
Output
NONE

GET MEDIUM

GET MEDIUM VI

Description
This VI retrieves the mediums status.
Parameters
Input
card ID
Device identifier.

network status IN
Structure containing the information that is representative of transmission quality on the network, and on its operating status. GET MEDIUM refreshes this structures.
see FIP NETWORK STATUS
Output
network status OUT
see above

SET MEDIUM

SET MEDIUM VI

Description
This VI sends a medium command.
Parameters
Input
card ID
Device identifier.

medium command
Sending a command to the FIP channel controller (see MEDIUM CMD).
Output
NONE

WRITE VAR BY ID

WRITE VAR BY ID VI

Description
This VI allows the user to write a FIP variable to the network from its identifier.
Parameters
Input
card ID
Device identifier.

identifier
Variable identifier (ID).

produced variable
Structure containing data to send (see PRODUCED VARIABLE).

NOTE: The real length of useful data which will be sent to the network depends on its definition in the FIP configuration file.
Output
NONE

READ VAR BY ID

READ VAR BY ID VI

Description
This VI allows the user to read a FIP variable on the network from its identifier.
Parameters
Input
card ID
Device identifier.

identifier
Variable identifier (ID).
Output
consumed variable
Structure containing read data (see CONSUMED VARIABLE).

READ VAR SVF BY ID

READ VAR SVF BY ID VI

Description
This VI allows the user to read a FIP variable on the network from its identifier even if its length and PDU definition is unknown into the FIP configuration file.
Parameters
Input
card ID
Device identifier.

identifier
Variable identifier (ID).
Output
consumed variable
Structure containing read data (see CONSUMED VARIABLE).

READ VAR TIME BY ID

READ VAR TIME BY ID VI

Description
This VI allows the user to read a FIP variable with a dynamic refresh status on the network.
Parameters
Input
card ID
Device identifier.

identifier
Variable identifier (ID).
Output
consumed var. time
Structure containing read data (see CONSUMED VARIABLE TIME).

production_time
Time elapsed between the variable writing by the user and its emission on the network (in μs).

transmission_time
Transfer time of the variable on the network (in μs). This time is calculated based on the variable length and the network speed.

consumption_time
Time elapsed between the reception of the variable from the network and the reading by the user (in μs).

reception_time
transmission_time + consumption_time

READ LST PRESENT

READ LST PRESENT VI

Description
This VI reads the management variable of the SM_MPS network called Presence List. This variable, created and distributed on the network through the active BA carrier device, contains the list of all subscribers connected to each medium.
Parameters
Input
card ID
Device identifier.
Output
present list
Structure containing the list of all subscribers and that indicates their presence or not (see PRESENT LIST).

SEND APER

SEND APER VI

Description
This VI allows the user to send a request for an aperiodical variable transmission.
This request has two levels of priority depending on the mode parameter value.
The necessary condition to send the request to the bus arbitrator is to have at least one produced variable with aperiodical variable transmission request authorized in the station configuration file (See <AperiodicService> tag).
Parameters
Input
card ID
Device identifier.

identifier
Variable identifier (ID).

mode
0 - Normal request, 1 - Urgent request.
Output
NONE

PURGE APER

PURGE APER VI

Description
This VI purges the aperiodic request storage FIFO. The FIFO type parameter value indicates the FIFO request to purge (normal or urgent).
Parameters
Input
card ID
Device identifier.

FIFO type
0 - Normal request FIFO, 1 - Urgent request FIFO.
Output
NONE

DEF VAR EVENT BY ID

DEF VAR EVENT VI

Description
This VI allows to dynamically define an event associated with a variable in emission or reception.
The associated event can be temporary or permanent.
A permanent event is sent/received each time the variable is produced or consumed.
However a temporary event is sent/received only once.
Parameters
Input
card ID
Device identifier.

identifier
Variable identifier (ID).

event code
Event type to associate with the variable.

  • EVT_SEND_VAR_T (0x0100): Temporary event on sent variable.
  • EVT_SEND_VAR_P (0x8100): Permanent event on sent variable.
  • EVT_RECEIVE_VAR_T (0x0200): Temporary event on received variable.
  • EVT_RECEIVE_VAR_P (0x8200): Permanent event on received variable.
Output
NONE

WRITE MSG

WRITE MESSAGE VI

Description
This VI allows the user to write a FIP message in the FIFO emission channel of the device.
Parameters
Input
card ID
Device identifier.

channel number
The channel on which the message is to be sent:

  • 0: Aperiodic messaging channel.
  • 1 to 8: Periodic messaging channel.
message frame
Structure containing message to sent (see MESSAGE FRAME OUT).
Output
NONE

READ MSG

READ MESSAGE VI

Description
This VI allows the user to write a FIP message in the FIFO emission channel of the device.
Parameters
Input
card ID
Device identifier.
Output
message frame in
Structure containing received message (see MESSAGE FRAME IN).

PURGE MSG

PURGE MESSAGE VI

Description
This VI allows the user to selectively purge the content of the message send queues.
It frees up the allocated FIFO blocks corresponding to the channel selected.
Parameters
Input
card ID
Device identifier.

channel number
The transmission channel that must be purged.

  • 0: Aperiodic messaging channel.
  • 1 to 8: Periodic messaging channel.
Output
nb blocks freed
Number of freed message blocks.

blocks freed tab
Table of freed block numbers. Up to 64 * uint16_t.

SET FILE RECEPTION DIR PATH

SET FILE RECEPTION DIR PATH VI

Description
This VI is used to set the directory path for the input files coming from the FIP network.
Parameters
Input
card ID
Device identifier.

input directory
Folder for receiving incoming files.
Output
NONE

SEND FILE

SEND FILE VI

Description
This VI allows the user to send a file on the FIP network.
Parameters
Input
card ID
Device identifier.

file path
Path of the file to be sent.

channel_number
Transmission channel type.

  • 0: Aperiodic messaging channel.
  • 1 to 8: Periodic messaging channel.
destination ID
File destination ID.

destination segment
File destination segment.

source ID
File source ID.

source segment
File source segment.

Output
NONE

ABORT FILE EMISSION

ABORT FILE EMISSION VI

Description
This VI allows the user to cancel the current file transmission.
Parameters
Input
card ID
Device identifier.
Output
NONE

WRITE TAG BY ID

WRITE TAG BY ID VI

Description
This VI allows to write a tag value to the FIP network from its tag ID.
Parameters
Input
card ID
Device identifier.

tag ID
Tag identifier.

data
Data to send (byte array format).
Output
NONE

WRITE TAG BY NAME

WRITE TAG BY NAME VI

Description
This VI allows to write a tag value to the FIP network from its tag name.
Parameters
Input
card ID
Device identifier.

tag Name
Tag name.

data
Data to send (byte array format).
Output
NONE

READ TAG BY ID

READ TAG BY ID VI

Description
This VI allows to read a tag value from the FIP network from its tag ID.
Parameters
Input
card ID
Device identifier.

tag ID
Tag identifier.

data in
Data to read (byte array format).
Output
data out
Read data.

READ TAG BY NAME

READ TAG BY NAME VI

Description
This VI allows to read a tag value from the FIP network from its tag name.
Parameters
Input
card ID
Device identifier.

tag ID
Tag identifier.

data in
Data to read (byte array format).
Output
data out
Read data.

START BA

START BA VI

Description
This VI starts the bus arbiter. The user can select the scan table number to run.
Parameters
Input
card ID
Device identifier.

ba number
Scan table number to run [1 or 2].
Output
NONE

STOP BA

STOP BA VI

Description
This VI stops the bus arbiter.
Parameters
Input
card ID
Device identifier.
Output
NONE

CONTINUE BA

CONTINUE BA VI

Description
This VI processes the command allowing the user to order resumption of bus arbiter program execution at a specific address.
This function is used for processing program instruction BA_SUSPEND, which is needed for the user to run the subscriber presence test (FIELDUAL compatible mode or ZN130). This command is only acknowledged by the software if the bus arbiter is in initial BA_PENDING status.

NOTE: If the program resumption order does not occur before the end of the timeout associated with the instruction BA_SUSPEND, the bus arbiter initiates its stop procedure.
Parameters
Input
card ID
Device identifier.

BA continue address
Restart address of the bus arbiter. This address is given by the BA_SUSPEND event.
Output
NONE

CHANGE MACROCYCLE

CHANGE MACROCYCLE VI

Description
This VI allows the user to change the scan table to be executed by the bus arbiter whether it be active, idle or stopped.
The macro-cycle change becomes effective on completion of execution of the current macro-cycle, on program instruction BA_NEXT_MACRO.
Parameters
Input
card ID
Device identifier.

BA number
Scan table number to run [1 or 2].
Output
NONE

SYNCHRO BA

SYNCHRO BA VI

Description
This VI allows to resynchronize execution of a bus arbiter program.
This instruction is used for processing program instruction BA_WAIT_SYNC or BA_WAIT_SYNC_SILENCE.
When the command is received, the bus arbiter resumes execution of its program at the current address.

NOTE: If there is no external resynchronization before the end of the timeout associated with instructions BA_WAIT_SYNC and BA_WAIT_SYNC_SILENCE, the bus arbiter initiates its stop procedure.
Parameters
Input
card ID
Device identifier.
Output
NONE

CHANGE PARAM BA

CHANGE PARAM BA VI

Description
This VI is used to modify some bus arbiter operating parameters on-line:

  • Physical address of network subscriber (station)
  • Maximum number of subscribers connectable to network
  • Bus arbiter priority level
  • Bus arbiter start timeout
  • Bus arbiter election timeout
Parameters
Input
card ID
Device identifier.

BA parameters
Bus arbiter parameters (see BA PARAMETERS).
Output
NONE

READ EVT

READ EVENT VI

Description
This VI allows the user to read a memorized event in a single storage queue (up to 32 items).
The following events are reported:

  • Sending / Receiving of a variable (optional)
  • Sending / Receiving of a message
  • Sending of a list of aperiodic requests
  • Reporting the switch of bus arbiter from idle to active status
  • Reporting of bus arbiter suspension

NOTE: This VI should be called cyclically in order to regularly pop the internal device event stack. For PCI/PCIe device types, it is recommanded to call it when a FIP network event is set (see INIT NETWORK Refnums).
Parameters
Input
card ID
Device identifier.
Output
event name
Event name received (see FIP EVENT).

event parameter
Additional parameter following the event_code (optional)

RESET STATS

RESET STATS VI

Description
This VI clears all the counters associated with FIP STATISTICS structure.

WARNING: USB FIP Arbitrator device does not support this function.
Parameters
Input
card ID
Device identifier.
Output
NONE

GET STATS

GET STATS VI

Description
This VI retrieves the statistics counters for the PCI/PCIe devices type.

Note : To keep the FIP STATISTICS structure up to date, the user must ensure that the events of the FIP network are correctly popped by calling the READ EVT VI.

WARNING: USB FIP Arbitrator device does not support this function.
Parameters
Input
card ID
Device identifier.
Output
FIP statistics
Statistics structure (see FIP STATISTICS).

OPC UA STARTUP

OPC UA STARTUP VI

Description
This VI starts an OPC UA server and expose the current FIP network context.
Parameters
Input
card ID
Device identifier.

TCP Port
OPC TCP port.
Output
NONE

OPC UA ITERATE

OPC UA ITERATE VI

Description
This VI executes a single iteration of the server's main loop.
Parameters
Input
card ID
Device identifier.

wait internal
Should we wait for messages in the network layer? Otherwise, the timeouts for the network layers are set to zero. The default max wait time is 50millisec.
Output
timeout
Returns how long we can wait until the next scheduled job (in millisec).

OPC UA SHUTDOWN

OPC UA SHUTDOWN VI

Description
This VI stops the OPC UA server.
Parameters
Input
card ID
Device identifier.

Output
NONE

OPC UA RUN

OPC UA RUN VI

Description
This VI starts an OPC UA server and expose the current FIP network context. It's a blocking function, so to stop the server the 'running' boolean must be set to false.
Parameters
Input
card ID
Device identifier.

TCP Port
OPC TCP port.

running
Server state (Force to false to exit the function).
Output
NONE