PSI5RollingCounterExample The sample configuration "PSIRollingCounterExample" shows the usage of the Option.Sensor and the VT2710 module. Channel 1 simulates a PSI5 ECU, Channel 2 simulates a PSI5 sensor. A signal "RollingCounter" is exchanged from the sensor to the ECU via the PSI5 protocol. The value of this signal is incremented from 0 to 255 on everey transmission by one and then restarts with 0. This example demonstrates the usage of the VT2710 module and shows the data transmission via the PSI5 protocol. The incrementation of the signal value is done by a CAPL program. The CAPL-program shows how to change sensor signals with CAPL-commands. Setting up the Hardware The "Setting up the Hardware" page explains how to set up an existing VT Rack in order to use it with the sample configuration. In the sample configuration "PSI5RollingCounterExample.cfg" the data are transfered via the PSI5 protocol between channel 1 and channel 2. Therefore the signal lines have to be connected to transfer the data. The Pin 7 Sensor+1 of the PSI5SENTpiggy Connector 1 has to be connected to Pin 9 ECU+2 PSI5SENTpiggy Connector 2 and Pin 6 Sensor-1 of the PSI5SENTpiggy Connector 1 has to be connected to Pin 8 ECU-2 PSI5SENTpiggy Connector 2. Running the sample configuration While executing the sample configuration, the window "Graphics" displays the changing signal values of in the shape of a sawtooth. The data SENSORSIM::Sensor1::TimeSlot1::Signals::RollingCounter are transmitted from the simulated sensor and the data ECUSIM::Sensor1::TimeSlot1::Signals::RollingCounter are received from the simulated ECU. The window "Data" shows the current values of the signals. The window "Trace" shows and stores the PSI5 protocol. If the execution of the sample configuration is stopped, the protocol data can be analysed using the stored data of the "Trace" window. The window "Write" shows informations of the execution of the sample configurtion. If there errors occur while executing the configuration, they are shown in the window "Trace". Meaning of the VT2710 module LEDs Executing the sample configuration the VT2710 module activates the following LEDs: PSI5/SENT 1 LED PSI5 flashes: Data are transfered using the PSI5 protocol. LED ECU lighted: An ECU is simulated. PSI5/SENT 2 LED PSI5 flashes: Data are transfered using the PSI5 protocol. LED Sens. lighted: A Sensor is simulated. Error messages Error 1 System Sensor: No matching hardware interface was found for sensor channel "ECUSIM". System Sensor: No matching hardware interface was found for sensor channel "SENSORSIM". Meaning of Error 1 If this error is shown, the VT-System is not activated. You can activate the VT-System with CANoe Options -> Extensions -> VT System -> VT System enabled and check if the set network adapter is the used. Error 2 System VT System: No modules found! System VT System: Error occurred while starting measurement System VT System: --> Please connect more slaves or remove modules. System VT System: --> Too few connected slave for the number of loaded modules. Meaning of Error 2 This error is shown if the VT System can not be reached. Check the network connection and the settings of the network adapter. Error 3 The sample configuration starts without error messages, but there is no signal shown in the window "Graphics". The window "Trace" shows the message: TimeSlot1::SensorError PSI5 ECUSIM Sensor1::TimeSlot1 SensorError Meaning of Error 3 No data are received from the ECU. Check if the signal lines are connected as descriped in "Setting up the Hardware" Description of the CAPL program The definition of the signal "RollingCounter" for the simulated sensor creates a system variable RollingCounter_Stim. This system variable can be used to set data with the CAPL-command QueueValues(). The queued values will be transmitted via the PSI5 protocol. Using this command, an array of values is set but not a single value. The data buffer of the system variable RollingCounter_Stim is filled at the start of the program. A Timer is called cyclically to refill the data buffer of the system variable. Therefore the data buffer of the system varialble is always filled and the data will be transfered continously.