Changing device definitions
A “device definition” refers to all definitions of communication with inputs and outputs, or other modules within a communication channel. This definition changes (not very often), especially when a new HW revision is released or new functionality is implemented.
Device definitions are provided as part of the Mervis IDE. When you create a new solution in the IDE, the latest version of the device will be used. However, if you open a solution created in an older version of the Mervis IDE, the new version of the IDE will automatically use the older device definitions to maintain backward compatibility. However, you will also be warned that you are using obsolete definitions:
Device definitions must be updated to the latest version to access newer features. This process involves some manual work, the length of which depends on the complexity of your solution.
We will now show how to replace the device definitions. To demonstrate, we will use a simple solution with a Neuron L503 unit whose device definition is named “Neuron L50x”. To use the new device definition, you must first remove the old one. In the left panel, right-click on the device name and click Delete in the context menu.
Right after deleting the device, the Mervis IDE will try to compile the solution and find the changes. With the old device, we also removed all input and output definitions in all places where we used the I/O, so in the programs the I/O will be marked red and the compilation will fail.
This is a good point for problem solving. Now add a new device definition. In the left panel, right click on the appropriate channel and select Add Library Device from the context menu.
In the Add Library Device dialog box, search for the appropriate device, add it to the right column, and confirm by clicking OK.
Since we just added the device definition, the solution still doesn't know anything about the controller inputs and outputs. Therefore, we now need to set up Autogen. You can do this for the entire device, but we recommend setting Autogen only for those inputs and outputs that you will really use. If you don't know how to do this, this guide will help you.
After setting up Autogen, you can begin replacing the I/O marked in red in the program with the correct (new) ones. Let's start by replacing the variable “Neuron_L50x_DI_1.01”. There is a free space below this block, so right click on it and select “Global Variables → Insert Existing Variable” in the context menu.
In the Insert existing variable dialog, search for the DI_1.01 variable that you want to replace. Select it and confirm by clicking OK.
As a result, a new data point appears below the original one. Now select the wire leading from the old variable by clicking, then use the cursor to grab the end of the wire and move it to the new data point.
The result should look like this:
Now you can delete the old data point. Right-click on it and select Delete from the context menu.
And repeat the process for all remaining I/O until the build succeeds. In our case it was enough to repeat for “Neuron_L50x_RO_2.01”:










