Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Vector CAPL - Bit-Shifting of 2 values

Hi,

 

I have the following problem:

 

I want to write a function in CAPL that takes two numbers (e.g. num1 = 521404 num2 = 5) and does the following:

 

num1 as bit is: 0111 1111 0100 1011 1100

num2 as bit is: 0000 0101

 

My result shall be FF E5 F4 BC (= 1111 1111 1110 0101 1111 0100 1011 1100)

 

Could someone help? I managed to write it as C# code but I have no idea how I could write in down in CAPL. It is not a test node in CAPL so I also didn't manage to include my C# dll.

 

Maybe someone can tell me how the code would directly work in CAPL? Unfortunately I don't have any C experience...

 

Thanks a lot!

0 Kudos
Message 1 of 3
(9,612 Views)

Hi,

 

What is your hardware and software setup?  Could you outline what NI hardware or software you are using?

 

Regards

 

 

0 Kudos
Message 2 of 3
(9,597 Views)

as you are using Vector Software (CANoe?) you should contact your local Vector support

0 Kudos
Message 3 of 3
(9,595 Views)