NI Home > Community > NI Discussion Forums

LabVIEW

Showing results for 
Search instead for 
Do you mean 
Reply
Active Participant
Taki1999
Posts: 482
0 Kudos

Re: how to read and display a signal from my a miccrontroller (MCB1700) onto labview connected via a CAN port on a PXI machine

Is your target PXI a real-time machine?

I'm afraid I don't have enough experience with that remote configuration to know how to troubleshoot it.

 

If you can log on locally to the PXI which has the CAN card, you should be able to run the Bus Monitor directly.

 

If your target PXI is a RT machine, you should be able to modify the CAN Receive.vi to put outputs into a Network shared variable.

 

 

Member
fhaljauf
Posts: 22
0 Kudos

Re: how to read and display a signal from my a miccrontroller (MCB1700) onto labview connected via a CAN port on a PXI machine

Yes, its a real time machine.

 

Any idea on how to modify the CAN Receive.vi to put outputs into a Network shared variable?

Active Participant
Taki1999
Posts: 482
0 Kudos

Re: how to read and display a signal from my a miccrontroller (MCB1700) onto labview connected via a CAN port on a PXI machine

Been a while since I've worked with RT so I'm doing a little guessing from memory.

 

Replace the BaudRate and interface controls with constants.

 

In your RT Project, Add a variable to replace the Output Array 2.  Making the datatype variant should work and then your host.vi would be responsible for extracting the array back to the Output Array 2 format.

 

Build, Deploy your vi and shared variables.  Your host.vi should then poll the shared variable for display.

 

Member
fhaljauf
Posts: 22
0 Kudos

Re: how to read and display a signal from my a miccrontroller (MCB1700) onto labview connected via a CAN port on a PXI machine

How do you do all of that?

Active Participant
Taki1999
Posts: 482
0 Kudos

Re: how to read and display a signal from my a miccrontroller (MCB1700) onto labview connected via a CAN port on a PXI machine

Unfortunately, I'm very rusty with my RT knowledge.

 

This console viewer looks promising for debugging:

RT Console Viewer

 

My limited knowledge of RT was obtained here:

Getting Started with RT

 

The getting started document should have details of how to use Network Shared variables.

Member
Rdawg
Posts: 6
0 Kudos

Re: how to read and display a signal from my a miccrontroller (MCB1700) onto labview connected via a CAN port on a PXI machine

Because you are using LabVIEW 2k11 and Windows 7, you will need to upgrade your NI-CAN drivers first.  2.7.3 is the first version that will support the new LV and Windows 7.

Start with that and then I think you'll be able to get farther on these steps

 

http://search.ni.com/nisearch/app/main/p/bot/no/ap/tech/lang/en/pg/1/sn/catnav:du,n13:hardwareDriver...

Member
fhaljauf
Posts: 22
0 Kudos

Re: how to read and display a signal from my a miccrontroller (MCB1700) onto labview connected via a CAN port on a PXI machine

I upgraded the NI-CAN drivers to 2.7.3 but i am still not able to see the option where i can select a channel and launch the bus monitor on MAX. What might be wrong?

 

I am just worndering, does  VISA Test Panel serves the same purpose as the Bus monitor on MAX?

 

Please help.

Member
ColdenR
Posts: 168
0 Kudos

Re: how to read and display a signal from my a miccrontroller (MCB1700) onto labview connected via a CAN port on a PXI machine

Hello fhaljauf,

 

You will also need to install NI-CAN on your PXI chassis. Did you do that as well?

 

Colden
Member
fhaljauf
Posts: 22
0 Kudos

Re: how to read and display a signal from my a miccrontroller (MCB1700) onto labview connected via a CAN port on a PXI machine

Yes i did. 

 

I was just wondering, is the bus monitor something that needs to be installed as well. If so, can you please point me to the link where i can install it.

 

Also, what is the appropriate VI that i should use when creating a project to get access to the CAN ports?

 

Thanks

Member
Rdawg
Posts: 6
0 Kudos

Re: how to read and display a signal from my a miccrontroller (MCB1700) onto labview connected via a CAN port on a PXI machine

If you search NI.com for "CAN Bus Monitor", there are alot of resources that come up:

 

http://search.ni.com/nisearch/app/main/p/bot/no/ap/global/lang/en/pg/1/q/CAN%20bus%20monitor/

 

Can I use Bus Monitor with RT system ::: http://digital.ni.com/public.nsf/allkb/6AF3AA9CE79365E386256F9E007E8CE9

Can I use BM with 2-port CAN::: http://digital.ni.com/public.nsf/allkb/257368380A4EE1FC86256C1B006E5F2A

 

 

Beyond that, you need to use the NI-CAN driver in LabVIEW to work with your card and get access to the channels etc.  As with most NI drivers, you typically open a reference to the card, and then extract the channels etc.  Check out the example finder in LabVIEW