LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to send data from CANOE to LABVIEW

Solved!
Go to solution

Hello,

 

I need to receive data from Canoe in Labview.

I prepared sender VI (Start command.vi) and receiver VI (Simple UPD-receiver.vi), attached.

 

My problem is:

1) When I run Canoe (measurement stopped) and send Start command -> Canoe starts measurement. (OK)

2) When I run receiver VI and send Start command-> receiver receives command. (OK)

3) When I run Canoe, then run receiver VI and send Start command -> receiver VI receives command but canoe DO NOT starts measurement (Canoe doesn't receives command). (NOK)

 

I'm using FDX (based on UDP) protocol and it looks like Canoe and receiver VI cannot work simultaneously on the same port (2809).

 

How can I overcome this problem?

 

PS: Later I want to set Canoe into free running mode to control Labview application so I need working receiver VI with Canoe.

0 Kudos
Message 1 of 11
(6,590 Views)

Hi,

I did something like this some time ago.

Could you explain your point 3) a liitle more? I don't get it 😉

 

  • Which data/commands is LabVIEW sending to CANoe?
  • Which data/commands is CANoe sending to LabVIEW?
  • Which of these are not received correctly in which application?

BTW: CANoe will offer a nice LabVIEW integration with version 8.2 (to come out soon). It can be used to exchange data between CANoe System Variables and LabVIEW Shared Network Variables. It seems to work right out of the box without much configuration. Could that be a solution for you?

0 Kudos
Message 2 of 11
(6,567 Views)

Hi, thanks for reply 😉

 

"Which data/commands is LabVIEW sending to CANoe?"
Labview sender VI sends FDX/UDP Start Command.

 

"Which data/commands is CANoe sending to LabVIEW?"
Right now none. Basically later I need to use FreeRunning mode to send data from Canoe to process it in Labview.

 

"Which of these are not received correctly in which application?"
My receiver VI receives "Start command" but Canoe not (measurement does not start).

If I stop receiver VI and send Start command again then Canoe measurement starts.

 

It will take some time for my company to purhase Canoe 8.2 so right now I must use FDX, I need working solution within a few days :).

0 Kudos
Message 3 of 11
(6,558 Views)
Solution
Accepted by topic author rafal.tlusciak

OK, now I get it.

 

Is there a reason you need three applications (sender + receiver + CANoe) at the same time?

Couldn't you put sender and receiver into one VI? That would solve your port problem.

 

Another way would be to send broadcast messages, so CANoe and the other VI can receive them.

 

A third option would be to send the message twice, once to CANoe, once to the receiver VI.

0 Kudos
Message 4 of 11
(6,549 Views)

Yes, I can put it together, it's working.

 

Thank you so much! 🙂

0 Kudos
Message 5 of 11
(6,541 Views)

Hello,

How did you set CAN signals and CAN frame using FDX protocol?

I am Developing a Automation Tool using LabVIEW to communicate with Canoe using FDX protocol.

System variable , Environment variable and CAN signals are set using Data exchange and to verify whether the signal is set or not I am using Data request. but i am facing problem to read CAN signal . Sometime CAN signals gets read and sometimes it does not but at actual the CAN signals is set in Canoe. The problem I am facing is only for CAN signals as Sys variable and Env Variable values is set and Read immediately.

And one more problem I am facing is that When Any Switch (Sys variable) is SET and RESET and the time between SET and RESET is suppose 100 ms then in Canoe Graphics I get a delay 105 ms or 106  or 103 ms but no consistent delay is observed, it varies +3 to +10 ms more.

I am using TestStand to generate seq file and FDX modules to read/write which is called by step in TestStand.

0 Kudos
Message 6 of 11
(3,885 Views)

Hi Abhi,

I would suggest using the NI Shared Network Variables. They are pretty easy to use in LabVIEW as well as in CANoe.

 

On the CANoe side, you need to enable them under Environment | Tool Couplings | LabVIEW Integration (see CANoe Help for details).

Once activated, you will have a system variable in CANoe for each shared network variable. By using CANoe's mapping window, you can then easily map these variables e.g. to CAN bus signals.

 

The perfomance of this tool coupling is also very good. You should get a latency < 1ms from labVIEW to CANoe (including the mapping).

 

One thing to keep in mind:

Bus signals are often not sent immediately. Depending on the messages the signals are in, it might take several ms before a signal change actually becomes visible on the bus.

 

0 Kudos
Message 7 of 11
(3,879 Views)

Hi SantaLucia,

Thanks for a reply, It is a good solution. But The project I am working was already started by other Developer and now I am working on it, 90 % of project is completed and for communication they have used FDX protocol. So now this issues I am facing.

0 Kudos
Message 8 of 11
(3,869 Views)

Hello SantaLucia,

 

I've done all steps in LabVIEW and CANoe, but I'm missing how to assign the variables to CAN bus signals. where's the CANoe's mapping windows?

0 Kudos
Message 9 of 11
(3,794 Views)

You can find it under Environment | Symbols | Symbol Mapping

SymbolMapping.png

0 Kudos
Message 10 of 11
(3,776 Views)