Questions tagged [capl]

Vector Communication Access Programming Language (CAPL), the C-like programming language developed by Vector Informatik GmbH for modelling network nodes, evaluation, and testing programs in real-time relevant simulations managed by CANoe and CANalyzer.

363 questions
6
votes
6 answers

Start and run CANoe from Command Prompt

Is it possible to start and run Vector CANoe from the Command Prompt and/or by using any other external script?
5
votes
2 answers

How to include a .h or .dll file in CANoe/CAPL

I want integrate a header .h or .dll file in CAPL (concretly Visa32.dll, visa.h or sicl.h) to control a multimeter 34461A. How can I include the .h files or .dll file in CANoe? I created an ECU module called multimeter. Thanks,
eloy0107
  • 77
  • 1
  • 2
  • 8
5
votes
1 answer

Is CAPL a scripting language or a programming language?

I'm new to Can Access Programing Language. In some documents CAPL is described as script. Can anyone explain, why it is referred to as script? Is it programming or scripting?
Moorthi Muthu
  • 409
  • 5
  • 13
5
votes
2 answers

Is it possible to define a CAPL function returning a text string?

I develop CAPL scripts in Vector CANoe, and I need to define several functions returning text strings. In C, I would write something like this: char * ErrorCodeToMsg(int code) or char [] ErrorCodeToMsg(int code) In CAPL, both definitions fail with…
Dmitry Grigoryev
  • 3,156
  • 1
  • 25
  • 53
4
votes
2 answers

How to call CAPL general functions from Python 3.x?

Issue I'm trying to call CAPL general functions (in my case timeNowNS) but I don't know if it's possible. What I'm using? I'm using Python 3.7 and Vector CANoe 11.0. The connection is done using the .NET CANoe API. This is how i've accesed the…
Stefan Muresan
  • 101
  • 2
  • 10
4
votes
1 answer

Call CAPL function from Python

I'm working on CANalyzer and I can't find how to call a CAPL function which contains a parameter. If I put num in functions_call.Call(num) it doesn't work. def call(num): print 'calling from CAN' x=int(num) functions_call.Call() …
alaya garci
  • 41
  • 1
  • 1
  • 4
4
votes
2 answers

What is the difference between system variable and environment variables in CAPL script?

What is the difference between system variable and environment variables in CAPL script with example?
Sachin Bharambe
  • 263
  • 3
  • 4
  • 16
3
votes
1 answer

CAPL- Get value of string defined sysvar

i defined a sysvar as a string in CANalyzer to use it with a panel. Then in a CAPL a would like to get the value of this variable and save the name,i tried as i usually do in CAPL with the numbers so: write("%s",@namespace::name_of_variable) But i…
Jordan.M
  • 103
  • 1
  • 2
  • 9
3
votes
1 answer

CAPL Code to send signal value from a button

I am using CANoe 11.0 to send a signal value from a button. I have a message from a CAN db with 6 signals, 8 bits for each signal. The message is cyclic but with a cycle time of 0ms, so, in order to send it, I figured out I need a button. But…
Luca
  • 39
  • 1
  • 6
3
votes
2 answers

How to use a signal as function parameter in CAPL

I am trying to write a function in CAPL that takes a signal and calculates the physical value with the signal value, the signal factor and the signal offset. This is how a simple gateway normally works: message CAN1.myMessage1 myMessage1 = {DIR =…
TomMaier
  • 131
  • 1
  • 2
  • 9
3
votes
3 answers

How to convert hex string to byte array in CAPL?

Considering having, for example, this type of hex string: char hex_str[100] = "0x01 0x03 0x04 0x0A"; How to get out of this string the byte array representation in CAPL, like: byte hex_str_as_byte_arr[4] = {0x01, 0x03, 0x04, 0x0A}; EDIT: Only…
PythonNoob
  • 914
  • 1
  • 7
  • 15
3
votes
2 answers

In CAPL, is there any function to start/open an executable in background?

I would like to run an executable from a CAPL script. Is there any function for that? I am looking for a function which will run an executable in the background. E.g. if a certain message is received, then start an application. Is there any…
Harshan.B
  • 93
  • 5
  • 13
3
votes
3 answers

Send Message/ Inject a message with CAPL

I am new in CANoe, and also CAPL language. But I want to ask you: How can I send a message with CAPL on the network of ECU's. For example: I want to send an Hex number( it is a question for an ECU) and after that I want to see the response of this…
Marius Balint
  • 39
  • 1
  • 1
  • 2
3
votes
3 answers

CAPL Script for Diagnostic Services

I am writing the CAPL script to Automise the Diagnostic services. I have read some DIDs which are bigger than 8 bytes in size. Till 8 bytes I can capture correctly the data in my CAPL script but when the data size exceeds the 8 bytes, then I get…
Hamid Gul
  • 31
  • 1
  • 1
  • 4
3
votes
1 answer

CAPL typedef bool

Does CAPL support something like typedef? My goal is to create a boolean: typedef char bool; I am able to do this: enum bool { false = 0, true = 1 }; but it isn't what I was going for because I have to do: …
theSparky
  • 440
  • 3
  • 13
1
2 3
24 25