From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

can we simulate CAN card in MAX

Hi
We can simulate DAQ cards in MAX.But can we simulate CAN card in MAX ?????
I am using PCI CAN series-2 card.
Please reply
 
0 Kudos
Message 1 of 9
(6,611 Views)
The newer versions of NI-CAN have virtual CAN ports, ports CAN256 and CAN257.  If you install NI-CAN, try configuring those as fake CAN ports in MAX.
0 Kudos
Message 2 of 9
(6,609 Views)
Hi
Thanxs for reply
In my PC NI CAN 2.3.2 is installed.Which is the Newer version of CAN.
Please explain more
 
Regards
Raman
0 Kudos
Message 3 of 9
(6,604 Views)
Hi
I am using NI CAN 2.3.2 version & If i am correct we can simulate CAN for the CAN version 2.3 or more.
But having CAN 2.3.2 i am not able to simulate the CAN card.
Please reply as soon as possible.
Regards
Raman
0 Kudos
Message 4 of 9
(6,598 Views)

Hi

The 2.3.2 allows you to simulate 2 CAN Ports (CAN256 and CAN257) directly in your code. But you can not, as you know from DAQ, simulate CAN devices within MAX.

DirkW

0 Kudos
Message 5 of 9
(6,588 Views)

Does CAN version 2.7.5 allow the simulation of CAN card.Kindly clarify regarding the same.

0 Kudos
Message 6 of 9
(4,623 Views)

Did you read the post, CAN256 and CAN257 can be used as types of simulation.  It routes CAN data to virtual ports and you can write your code to do what ever you want with that data.

0 Kudos
Message 7 of 9
(4,618 Views)

yes,I am clarified.Is it possible to post a sample code related to the same?

0 Kudos
Message 8 of 9
(4,613 Views)

No posting of code is needed, open the Help >> Example Finder.

 

Search for the example CAN Receive.vi, and Transmit Receive same Port.vi.  Before running the CAN Receive.vi set the interface to CAN257, then run it.  Then in the Transmit Receive same Port.vi set the interface to CAN256 and then run it.  Now when you click Write it will send a frame out on CAN256.  CAN256 and CAN257 are virtual loop back ports.  What is sent on one is received on the other.  So you should see the frame you wrote appear in the CAN Receive.vi which is monitoring 257.

 

Using this technique you can write code that monitors one of these ports, then reacts sending simulated data when requested, or set it up to just periodically send the data you want.

0 Kudos
Message 9 of 9
(4,604 Views)