VXI and VME

cancel
Showing results for 
Search instead for 
Did you mean: 

VXI Controller, TIC ASIC and PWM control

According to vxibook.pdf, some VXI controllers have TIC ASIC with an internal 16-bit counter.

I'm now using a NI VXI controller (VXI-MXI-2 and PCI-MXI-2), i want to know —— if the controller has TIC ASIC so that i can use the internal 16-bit counter for PWM output.

If it doesn't have, is there any idea to make PWM control with VXI instruments?

P.S The following is the VXI modules that I use:

1. NI-VXI controller;
2. Tek 1410A Intelligent Frame;
3. Tek 4351 SurePath Switch module;
4. Tek 4101A DMM/COUNTER;
5. Racal Instrument DAC ADC DIO module;

Thanks

Message Edited by no at present on 03-14-2005 05:07 AM

0 Kudos
Message 1 of 16
(10,394 Views)
The NI VXI-MXI-2 controller comes with TIC ASIC so you can use it to program counting and triggering. Please go to the link below for more information about using TIC ASIC:

http://www.ni.com/support/vxi/vxitrig.htm
0 Kudos
Message 2 of 16
(10,356 Views)
Thank you, TongY.

The controller I use is VXI/VME-PCI8000 series (I guess so according to the manuals I have), does it have TIC ASIC? I read the manuals, there's no mention of it. I also checked the PCI-MXI-2 card, there seems no that chip (except NI MANTIS-AQ and NI MITE-AQ).
Besides, I read the article "Trigging with NI-VXI" and implemented the example program in Appendix B "Example Using the TIC Counter to Implement a Program Delay", which results the value of "old_handler" is 0x0. (old_handler = GetTrigHandler (GET_TRIG_HNDR); )

I wonder if i missed something or I should check it in another way.
Do you have any suggestions? I am very grateful to you.

Message Edited by no at present on 03-16-2005 09:21 PM

0 Kudos
Message 3 of 16
(10,351 Views)
Your board should have the TIC ASIC chip. Do you know what revision is the the VXI-MXI controller? I don't know what does it mean when the "old_handler" has avalue of 0, doesn't that mean "successful"? I would check the VXI function reference manual for more information on those functions.
0 Kudos
Message 4 of 16
(10,334 Views)
Sorry, I made a mistake. You have the VME-MXI-2 controller which does not have the TIC functionality since there is no CLK and TRIG signal output on the front panel of the controller. You would also need a host clock on the backplane to provide reference, there is a 10Mhz clock can be used by VXI-MXI controllers but not the VME controller.

So if you want to keep using the VME-MXI-2 controller, you can purchase a counter timer DAQ board to perform the PWM generation. I apologize for the mistake.
0 Kudos
Message 5 of 16
(10,324 Views)
The return value "0" means "Invalid line or no hardware support" with reference to "LabWindows VXI Library Reference Manual" (please see attached picture). In other words, if the controller has TIC, the value should not be "0". So, how to determine TIC in this case?

As to the "revision", i'm not sure if I understand that definitely, but I got some information within VISA Session and hardware configuration:
------------------------------------------------------
VXI0::0::INSTR (PCI-MXI-2)

Manufacturer Name: Nat'l Insts
Manufacturer ID: 0xFF6(4086)
Model Code: 0xFEC(4076)
VXI Device Class: 2
Version of Implementation Specification: 0x300000
------------------------------------------------------
VXI0::1::INSTR (VXI-MXI-2)

Manufacturer Name: Nat'l Insts
Manufacturer ID: 0xFF6(4086)
Model Code: 0x0EA(234)
VXI Device Class: 1
Version of Implementation Specification: 0x300000
------------------------------------------------------
Class="PCI-MXI-2"
Key="PCI-MXI-2"
Version="1.0"

Class="MXI-2 Extender"
Key="VXI-MXI-2"
Version="1.0"
------------------------------------------------------

will these be useful? waiting for your answer...thanks in advance!

Message Edited by no at present on 03-18-2005 12:23 PM

Message Edited by no at present on 03-18-2005 12:25 PM

0 Kudos
Message 6 of 16
(10,323 Views)
I saw your last reply, I appreciate your help very much!

By the way, I'm using a VXI controller, not VME controller, which I think is NI VXI/VME-PCI8000 Series.
0 Kudos
Message 7 of 16
(10,319 Views)
What version of NI-VXI driver software do you have? The newer version of NI-VXI (ver3.0--3.2.x) does not support TIC.
0 Kudos
Message 8 of 16
(10,303 Views)
I just took a look at your previous postings and found that you used this function:
old_handler = GetTrigHandler (GET_TRIG_HNDR) and received a value of "0".

Did you set up the trigger handler first before using the "GetTrigHandler" function? There is a function SetTrigHandler you need to use to set the specified trigger lines, and then run the GetTrgiHandler function. Also, what's the value of the "GET_TRIG_HNDR"? Is it set to the correct lines for TIC?

Please check the NI-VXI API Reference manual for the correct syntax for these two functions and the trigger lines to use for TIC. Maybe that will open the doors for you. To get to the manual, go to Start>>Program>>National Instruments>>VXI>>VXI API>> VXI API HElP and search for these two functions.
0 Kudos
Message 9 of 16
(10,298 Views)
TongY, the following is the program I mentioned and used, which is provided in the attached paper titled "Triggering with NI-VXI".


Appendix B
Example Using the TIC Counter to Implement a Program
Delay
On a PC platform, most languages include a delay function to temporarily halt the execution of
the program for a specified amount of time. These functions rely on the PC system clock which
runs at 18 Hz, resulting in a 55 ms resolution timer. In some situations, it is necessary to have a
delay function with a higher resolution. The following program creates a delay function with a
resolution of 1 ms for use in a standalone DOS executable. It takes advantage of the TIC counter
to interrupt the program every 1 ms. Of course, there are several ways in which to have the TIC
chip provide this feature, but this one requires only the TIC counter and no trigger lines.
Another advantage of this function is that it does not require any special setup. All you need to
do is call TIC_Delay() as you would normally call the Delay() function.

#include "nivxi.h"
#include "stdio.h"
#include "process.h"
#define CONTROLLER -1
#define SET_TRIG_HNDR 1U<<14
#define GET_TRIG_HNDR 50
#define SYNC 4
#define CLK10 70
#define ONE_MS_COUNT 10000U /* number of CLK10 cycles that = 1 ms */
#define NO_ERROR 0
static int16 ret;
/* Interrupt Flag and Function */
static int delay_flag=0;
NIVXI_HQUAL void NIVXI_HSPEC delay_intr_handler (int16, uint16, uint16);
NIVXI_HQUAL void NIVXI_HSPEC (*old_handler) (int16, uint16, uint16);
/**************/
/* TIC_Delay -- 1 ms res. delay function using interrupts
/**************/
int TIC_Delay (uint16 count)
{
uint16 loop;
/**/
/* Enable the Interrupts. Notice the return codes have an
/* extra number subtracted to more easily identify the
/* function that returned the error code.
/* Also notice that the old handler is retrieved first so that
/* it may be reinstalled at the end of the delay function.
/**/
old_handler = GetTrigHandler (GET_TRIG_HNDR);
ret = SetTrigHandler (SET_TRIG_HNDR, delay_intr_handler);
if (ret<0) return ret;
ret = TrigCntrConfig (CONTROLLER, 0, CLK10, ONE_MS_COUNT);
if (ret<0) return ret - 200;
ret = EnableTrigSense (CONTROLLER, 50, SYNC);
if (ret<0) return ret - 400;
/**/
/* Respond to count interrupts.
/**/
for (loop=0; loopwhile (!delay_flag); /* Waiting for interrupt */
delay_flag = 0;
}
ret = DisableTrigSense (CONTROLLER, 50);
if (ret<0) return ret - 800;
ret = SetTrigHandler (SET_TRIG_HNDR, old_handler);
if (ret<0) return ret - 1000;
return 0;
} /* END TIC_Delay () */
NIVXI_HQUAL void NIVXI_HSPEC delay_intr_handler (int16 controller, uint16 line, uint16 type)
{
delay_flag = 1;
/* Reset the 16-bit Counter */
TrigCntrConfig (CONTROLLER, 2, CLK10, ONE_MS_COUNT);
} /* END delay_intr_handler */
void main(void)
{
/* It is not recommended to call InitVXIlibrary() in the */
/* Delay function because the overhead on InitVXIlibrary() */
/* can be fairly large. */
ret = InitVXIlibrary();
if (ret<0) {
printf ("Init Failed\n");
exit (-1);
}
/* Delay for 1 ms */
printf("First for 1 ms...\n");
TIC_Delay (1);
/* Delay for 100 ms */
printf("Done, now for 100 ms...\n");
TIC_Delay (100);
printf("Done!\n");
ret = CloseVXIlibrary();
}

帖子被Yanghuan在03-23-2005 01:46 AM时编辑过了

0 Kudos
Message 10 of 16
(10,289 Views)