6. Core Features
The goal of this section is specifically to assist those who are new to Intrepid hardware and software. Advanced users may wish to skim or even skip this section entirely.
6.1. Interfacing with Vehicle Networks using Vehicle Spy
Following are simplified examples of how to use Intrepid’s Vehicle Spy, the ideal tool for working with your device. Due to the complexity of Vehicle Spy, we only describe the basics necessary for the examples; for full details on this powerful software tool, please see the separate Vehicle Spy documentation .
Note
Intrepid makes a wide variety of hardware, each having their own mix of different networks integrated. Your device may not have all of the networks and capabilities in the following section. If you are unsure of your device’s features, reference Introduction and Overview or contact Customer Support.
6.1.1. Monitoring CAN/CAN-FD and Ethernet
Once the device is configured correctly, this example will show how your device can monitor CAN traffic on a bench network using Vehicle Spy 3.
Assuming that your network already has CAN messages being transmitted by other devices, we can monitor that traffic with these simple steps:
Launch Vehicle Spy: Start Vehicle Spy by double-clicking its icon or selecting it from the Windows Start Menu.
- Select your device: On the Logon Screen, select your device
if it does not already have a green checkmark next to it. To do so, right-click the device name and choose Select Hardware.
Go Online: Press the blue button in the top left corner of Vehicle Spy.
The program will go online and automatically switch to Messages View, showing you the incoming traffic. The example below shows CAN messages that are being transmitted to your device. By default, CAN messages sharing the same Arbitration ID will be shown with the latest update of data bytes available (Static View). Similarly, Ethernet messages are grouped based on Source Address and Ethertype. If you prefer to see the messages in chronological order, press the Scroll button located just above the message display.
Notice that the messages are shown in their raw form, with some header information and data bytes. If you have a database matching the message traffic being monitored, you can load it into a platform and Vehicle Spy will decode the messages and show the signals within each. For details on how to accomplish this, please consult the Vehicle Spy documentation.
6.1.2. Transmitting on CAN/CAN-FD and Ethernet
In addition to monitoring network traffic with your device, we can also easily generate and transmit traffic of our own. We’ll show how this is done by creating and then transmitting am custom CAN message on the HS CAN channel.
Creating a CAN Transmit Message
Make sure your device is connected to your vehicle network. Then follow these steps to create and transmit a message:
Launch Vehicle Spy: Start Vehicle Spy by double-clicking its icon or selecting it from the Windows Start Menu.
Select your device: On the Logon Screen, selec your device if it is not already selected: right-click the device name and choose Select Hardware.
Load Messages Editor: Select Messages Editor from the Spy Networks menu.
Select Transmit Messages: Click the Transmit button, found in the blue bar.
Create Transmit Message: To the right of the drop-down box that currently shows “HS CAN”, click the button. Vehicle Spy will generate a new HS CAN transmit message called “Tx Message HS CAN 1”, preset with default values.
Set Message to Arbitration ID 123: Under the Arb ID column for the message, enter the value “123”.
Add Message Signal: In the middle of the screen, find “Signals in Message; just below this click the button. A signal called Signal is created.
Rename Message Signal: Under the Description column, double-click Signal and change the name to Engine Speed.
Creating an Ethernet Transmit Message
Select Transmit Messages: Click the Transmit button, found in the blue bar.
Change to Ethernet transmit table: Select “Ethernet” from the “on Network” drop-down menu
Change Ethertype: Select “ARP” from the Ethertype drop-down menu
Change the Detination Address: Use a broadcast address. (FF:FF:FF:FF:FF:FF)
Transmitting on CAN and Ethernet
We’ll now use the Tx Panel to specify a simple static value to send in that signal, and then instruct Vehicle Spy to transmit the message periodically.
Load Tx Panel: Select Tx Panel from the Spy Networks menu.
Select Message: Click on “HS CAN Message” under Description on the left side of the screen.
Set Signal Data Value: On the right side of the screen, double-click under Value for the Engine Speed signal, and enter “207”. (You may need to first move the vertical divider bar that separates the two halves of the Tx Panel, by clicking on it and dragging it to the left.)
Select Transmission Rates: The message by default is set to “Periodic” transmissions, but the rate says “None”. Double-click in this field, scroll down and choose “0.100” for both the CAN and Ethernet messages.
Monitoring
Let’s now switch to Messages View and go online to see our message being transmitted on the CAN and Ethernet networks.
Switch to Messages View: Select Messages from the Spy Networks menu.
Go Online: Press the blue arrow button in the top left corner of Vehicle Spy. You should now see a new “Message HS CAN 1” message show up about every 100 ms Notice the green dot under the Tx column, which labels this as a transmitted message.
Expand Message: Press the + sign to the left of “Message HS CAN 1”. Vehicle Spy shows you the Engine Speed signal with the value we set in both decimal (207) and hexadecimal (0xCF).
Naturally, in a real example we would want to create a more realistic depiction of engine speed. This can be done in a variety of ways in Vehicle Spy, such as writing a function block program to describe behavior and control message transmission. Please refer to the Vehicle Spy documentation, the Intrepid website, or Intrepid’s tech support for examples of transmits and simulation of frames.
6.2. CoreMini
CoreMini is an embedded environment within Intrepid hardware that allows many functions found in Vehicle Spy to be executed in hardware for real-time performance and/or standalone execution. Function Blocks , periodic messages , automatic message replies , and standalone gateways . are all features in Vehicle Spy that can be executed in the embedded CoreMini environment.
6.2.1. High Performance Script Execution
Function Block Scripts , can be thought of as simple state machines that have access to all of the network resources of your device. Inputs to the script can be network traffic, network status, and state variables. The script executes logical statements on its inputs, can perform arithmetic operations on state variables, and send messages on a network based on outcome of these logical statements and state variables.
Function block scripts can be executed by Vehicle Spy while connected to a PC, but since Windows is not a real-time operating system, the performance of some functions in Vehicle Spy can have unacceptable latency and determinism. In this case, it is advantageous to have the script run in the embedded CoreMini environment for the time-critical functions with Vehicle Spy executing the non-time-critical functions. To load the scripts into the hardware for embedded execution, use the CoreMini Console . The script will immediately start to execute and continue to execute when online with Vehicle Spy.
Note that in many cases, it is not desirable to have scripts running embedded and in Vehicle Spy. To prevent this, ensure that the Function Block Start Tab is set to “Start Immediately Embedded Only”.
6.2.2. Stand-alone Operation
Stand-alone execution of scripts and gateways is a powerful feature in most Intrepid products. Once a script is loaded in CoreMini, it will run stand-alone at power up, provided neither of the following conditions prevent its execution.
The script is configured to wait for a Start Condition before execution.
Scripts are disabled when the device detects a USB host computer at power up. This functionality is a failsafe, should a errant CoreMini script make the device unresponsive. For a script to run, first connect power, then connect USB.
Bypassing script failsafe with USB host connected
This can be disabled on some devices having a second failsafe to prevent script execution by holding one of the membrane buttons down while applying power. See The neoVI Explorer Configuration Utility for more information.