简体   繁体   中英

How to create new environment variable for CAN database in CANoe for CAPL and Panels?

I am new to CAPL and CANoe. I want to access some particular signals from CAN database. I am able to create new system variables for Panel designing, but for some specific scenario, I want to use CAN signals directly as environmental variables.

I am unable to add new environment variables in the database, could anyone help me?

I want to access some particular signals from CAN database.

You can do this easily from a CAPL script or a Panel. In CAPL script, start typing the name of the signal, or its identifier. If you set up a dbc file with that CANoe configuration, you'll have access to auto-complete functions.

From a Panel, select a suitable UI control, then go into properties and see that you can link it to a given signal, provided you set up a dbc for that CANoe configuration.

I am able to create system variables for PANEL designing, but for some specific scenario, i want to use CAN signals directly as environmental variable.

You can create System Variables, but are not interested in them. You want to use CAN signals as Environment variables.

CAN signals are meant to be physical signals transmitted over a bus (CAN, LIN etc..). Environment Variables are digital signals living in the CANoe simulation. They will never be transmitted over a bus. On a side note, you can map a signal over a variable using the Environment > Signal Mapping function of CANoe, from the ribbon.

I am unable to add database in environmetal variable

Many pages of the help are referring to env vars being usable only if they were added to the Database, but then again via the CANoe Ribbon there is no way of adding new Environment Variables, and this is were you are confused.

To set new Environment Variables, you'll need CANdb++. To see existing Environment Variables, go View > List > Environment Variables. From here, you can add new env vars to the database.

Env Vars are typically used as interface between network nodes and specifically in panels as handles.

More details at: https://support.vector.com/kb?id=kb_article_view&sysparm_article=KB0012412&sys_kb_id=e63502681b2614148e9a535c2e4bcbb1&spa=1

Starting from CANoe and CANalyzer 12 no more new Environment Variables can be created in CANdb++ Editor.

Since CANoe/CANalyzer 7.0 System Variables are supported as a successor of Environment Variables for configurations in CANoe and CANalyzer.

It is still possible to use existing configurations and database files which contain Environment Variables. But it is recommended to use System Variables instead.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM