2

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?

Daemon Painter
  • 3,208
  • 3
  • 29
  • 44
GGG
  • 55
  • 1
  • 1
  • 10
  • Welcome to SO. Please take time to read https://stackoverflow.com/help/how-to-ask and edit your question. – Bussller Jul 15 '20 at 09:25

3 Answers3

2

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.

Daemon Painter
  • 3,208
  • 3
  • 29
  • 44
2

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.

0

As per the vector documentation Environment variables can not be created from the version 12 but can be if there are already created variables. Environment variables are replaced by system variables. But still we have back door to create one. video in the following link

https://www.youtube.com/watch?v=Jhoj2f-XQ18

gives more details about how to create ev variables in CANoe version above 12, But it is good to migrate to system variables, because vector can stop supporting ev variable at any point of time.