Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQMX Interference with timing

I have a 6224M that seems to be slowing down the execution time of a program.
When I remove the cable, my serial<->CAN functions twice as fast as with the cable attached.
 
Any ideas would be appreciated.
 
Thanks
 
0 Kudos
Message 1 of 7
(1,673 Views)

Hello jspaarg,

 

After reviewing your post, I still need a little more information to help diagnose the improper execution time. Which version of NI-DAQmx are you using? What CAN hardware are you using (i.e. PCI, PXI, PCMCIA)? Is it National Instruments hardware?

 

Furthermore, are you using any of the CAN DAQ synchronization VIs? If so, are you calling them in separate loops or the same one? What version of NI-VISA and NI-CAN are you using?

 

 

Jordan Randall
National Instruments Italy
0 Kudos
Message 2 of 7
(1,635 Views)

Thanks for the reply.

I am running the DAQmx 7.4 driver set.

My serial<->CAN convertor is serial only as far as the PC is concerned.  It runs from COM1 at 57,600 BAUD.  The convertor is a small embedded-device that converts the serial to CAN for my device.  My device is a PIC 18F8520 controller (if that matters).

The application that is giving me concern updates the embedded software in the PIC by writing data over the serial port (and thus to the CAN).  The controller receieves the data and writes its FLASH.

When the 6224 is connected (via the cable), the download takes about 58 seconds.  When the 6224 is not connected, the download takes about 29 seconds (pretty much twice the speed).  This timing is extremely consistent.

Any ideas are greatly appreciated.

Edit: The 6224 is not involved in any way in the FLASH being updated.

Message Edited by jspaarg on 01-23-2006 05:28 PM

Message Edited by jspaarg on 01-23-2006 05:29 PM

0 Kudos
Message 3 of 7
(1,638 Views)
Hi Jspaarg,

How are you communicating with this serial <-> CAN converter? Are you using NI-VISA to do this communication or are you making calls to the Windows API for this? Could you possibly post a small example of what you're doing in your code? If you can, try to minimize the code (commenting out or deleting everything except for the setup and the transfer you're talking about). This will help us figure out what's causing the speed issues.

Regards,
Matt S.

LabVIEW Integration Engineer with experience in LabVIEW Real-Time, LabVIEW FPGA, DAQ, Machine Vision, as well as C/C++. CLAD, working on CLD and CLA.
0 Kudos
Message 4 of 7
(1,616 Views)
This is a VB.net application.
 
I am using only the .net driver for the DAQmx card.
 
VB is calling its own serial handler for communicating with comm1.
 
I will be happy to post my .net code if that will be helpful.
 
However, the issue I believe is in the driver communicating with the card in the background.
When I am doing nothing but serial communication, the program runs at half speed when the 6224 cable is plugged in.
If I do nothing more than remove the cable, the serial communication happens twice as fast.
 
 
 
 
0 Kudos
Message 5 of 7
(1,619 Views)

HI jspaarg,

 

The .NET code may not be necessary.

 

Lets see if I understand correctly:

 

You are programming your PIC by way of the serial port on the PC. The serial data is converted into CAN and then compiled onto your PIC’s FLASH.

 

My confusion is how the PCI 6224 DAQ card is involved? (via the cable?) Are you using the standard SHC68-68-EPM shielded cable or is it something you fabricated? Also, is the cable attached to the PIC somehow or is it a separate application?

 

If the SHC68-68-EPM cable is acquiring data from the PIC at the same time it is receiving a bit file download from the serial<->CAN converter it may be sharing the resources on the PIC?

 

If the PCI 6224 DAQ card is part of another process, does the delayed execution occur when the cable is plugged into the back of the PCI card with nothing on the other end? If so, check for bent pins.

 

Post a reply with any additional info.

  

Jordan Randall
National Instruments Italy
0 Kudos
Message 6 of 7
(1,594 Views)
The application is on a PC that is part of a test system to verify functional integrity of the PIC device (our product).
 
The 6224 is used to measure analog signals on dummy loads controlled by servos in the PIC.
 
When testing occurs, the version of the PIC software is checked, if it is an old version, then the new version is loaded via the serial port.
 
After the version is verified (or reprogrammed), the actual testing utilizing the 6224 begins.
 
Perhaps bent pins are possible because we are using very little functionality of the 6224 (one digital port and five analog ports).
 
I will check.
 
0 Kudos
Message 7 of 7
(1,589 Views)