LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CANcaseXL

hi 

i am in final year b.tech . now adays am on my 6 months training . i have been given a project related to CANcaseXL. i have been asked to program in a such a ways that the job of typing the meesage in CANviewer and then sending it is done automated. that is at present the messages have to typed and sent into the network . i have to do that the typing part is replaced and selceting  .ASC file or only few messages and send them directly to the network . .ASC file is the file containing messages .


please help....... 

0 Kudos
Message 1 of 15
(4,432 Views)

There is now a reasonably complete wrapper library for the vxlapi.dll uploaded to the NI Developer Community.

You may wish to have a look at it if you're developing for the Vector XL hardware.

 

https://decibel.ni.com/content/docs/DOC-30180

Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
0 Kudos
Message 2 of 15
(4,305 Views)

Hello TroyK.

 

First of all I'd like to thank you personaly because you did a great work with vxlapi.
I 'm a new user with Vector hardware using LabVIEW and I need your support.

When you are using a device who needs some TX periodic messages to stay alive, how I can do that using vxlapi?

There is any way using vxlapi to configure the Vector XL to manage periodic TX and RX messages automatically?

Do you have any example?

 

Best regards,

Victor Silva

 

 

 

 

 

 

 

 

 

0 Kudos
Message 3 of 15
(4,187 Views)

Hi Victor,

I have not seen (or worked out) any method exposed in the API that will handle the transmission of periodic messages for you.

 

Some Vector hardware certainly has this capability but I suspect it is deliberately not exposed in the API because Vector wants you to purchase a license for their CANoe software.

 

I have written my own message scheduler in LabVIEW. That is what I use but the IP belongs to my employer so I can't just post it online.

 

Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
0 Kudos
Message 4 of 15
(4,165 Views)

Hi TroyK.

That's OK.

Many thanks for your prompt support.

 

Kind regards,

Victor Silva

0 Kudos
Message 5 of 15
(4,132 Views)

Hi Troy,

 

I'm using your great VXLPI, It's excellent. But could you send the periodic message every 20ms +- 2ms in Labview? The windows can guarantee that precise timing?

 

Thanks

Hamid

0 Kudos
Message 6 of 15
(3,866 Views)

@hamidnaghi1234 wrote:

 

I'm using your great VXLPI, It's excellent. But could you send the periodic message every 20ms +- 2ms in Labview? The windows can guarantee that precise timing?


No it can't guarantee any kind of timing.  Have you ever been using your computer and your mouse or keyboard just stops responding, and windows goes Not Responsive for 20 or 30 seconds?  What do you think will happen in those 2ms window you have for sending a message during that time?  If your setup truly requires a rate of 20ms +/- 2ms, then you are going to need hardware timed transmission such as the XNet hardware, or some deterministic OS on reliable hardware (like an embedded cDAQ, cRIO, or other microcontroller).  But honestly in most cases your timing needs aren't as tight as 2ms.  CAN is a network that has lost frames all the time, and it is expected.  Higher priority messages will cause lower priority ones to have to be resent.  With all this in mind most devices that want to see a message every 20ms, usually have a much higher timeout like 100ms or more before it will think a device is no longer transmitting data.

 

BTW Troy if you do ever find a way of performing re-transmit on Vector hardware in LabVIEW the community would love you more than they already do.

0 Kudos
Message 7 of 15
(3,862 Views)

Thank you Hooovahh,

 

But I see the "Create Timer Interrupt VI" on the following page:

http://zone.ni.com/reference/en-XX/help/373925B-01/myrioreference/myrioref_create_timer_irq/#Input1

If I can call a VI by PC timer interrupt then it should be very accurate timming. I've already used the PC timer interrupt in the C programing to do a task every 1ms, but I'm not sure that VI can do that? Also, I couldn't find  the "Create Timer Interrupt VI" on the Labview palette. I installed the Rio toolkit too. It's on the help file but once I click on the find it on the palette then it pops up an error.

0 Kudos
Message 8 of 15
(3,851 Views)

@hamidnaghi1234 wrote:

 

If I can call a VI by PC timer interrupt then it should be very accurate timming. I've already used the PC timer interrupt in the C programing to do a task every 1ms,


You may get lucky, but at any moment it might not work.  Windows is not a deterministic operating system.  Any timing you have is at the mercy of the operating system, and then the kernel (among other things).  You might hit that 1ms timing a million times in a row, and then once it might take 100ms and you will have no control over this.

 


@hamidnaghi1234 wrote:

Also, I couldn't find  the "Create Timer Interrupt VI" on the Labview palette. I installed the Rio toolkit too. It's on the help file but once I click on the find it on the palette then it pops up an error.


The Create Timer Interrupt is specifically a function for the myRIO hardware, which is running an Real-time deterministic Linux OS on an ARM based processor.  This function is not for Windows.

0 Kudos
Message 9 of 15
(3,847 Views)

The best you can do under windows is up the process priority for your app. Then it should get interrupted less often. Using this method on PCs with no virus scanner installed I rarely get delays greater than 2ms.

As Hooovahh said, on a non-real-time OS like Windows, you're at the mercy of the OS.

SetPriority.png

Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
Download All
0 Kudos
Message 10 of 15
(3,838 Views)