ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Xnet CAN

Hallo,
i prepared a database with message 1 and message 2 using XNET database editor.

Message 1 Input:

  Tnumber u8

  range 0..200m Resolution 0.1

  velocity -200 ... +200 Triggering 0.1

 

Message 2 Output:

Dnumber u8

range 0..200m Resolution 0.1

velocity -200 ... +200km/s Resolution 0.1

 

Now message 1 is to be sent from CAN 1 and CAN 2. Here it should be possible to send 3 targets with different distance . Message 2 is now to be sent from CAN 2 to CAN 1. This regularly sends the values for target 1, 2 and 3, taking values from the received message 1 and adding random numbers in the range of +- 1% of the range.

i did a sample vi which is able to send the message 1 from CAN 1 to CAN 2. then modify the data by adding random numbers to range.and i cannot send the message 2 from CAN 2 to CAN1.
I have attached the vi here.I am using single XY mode.
How to do the same with frame mode and single point?
Please guide me.Thank you in advance

0 Kudos
Message 1 of 4
(1,188 Views)

You cannot use XNET Read on an output session. If you want to read and write on a single interface, you must use two different sessions.

See shipping examples at Help >> Find Examples >> Hardware Input and Output >> CAN >> NI-XNET >> Intro to Sessions >> Multiple Sessions

 

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
-------------------------------------------------------
https://github.com/ZhiYang-Ong
0 Kudos
Message 2 of 4
(1,177 Views)

would you give me some more information with rrespect signal XY session mode and Vi attacehd?
Sorry as i am new to this Xnet, it would be great if you can give me some deatiled info and suggestions

Thank you in advance.

0 Kudos
Message 3 of 4
(1,161 Views)

See Session Modes for detailed explanation.

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
-------------------------------------------------------
https://github.com/ZhiYang-Ong
0 Kudos
Message 4 of 4
(1,136 Views)