VXI and VME

cancel
Showing results for 
Search instead for 
Did you mean: 

VXI panel using by maptrigtotrig

Hi everyone, my Question is  how to map Panel In(line:40) and Use Vxitrig to get the trigger from Function Generator. In attachment of Code is my Program to test on VxWorks.  Vxitrig.c is default Vxitrig in NI-VXI. The other, VXIsquare_wave.c is a function that Test Internal generate a SquareWave and Internal Get Signal by WaitforTrig and also Test the signal by using Function Generator to input the signal to HP E1421B pannel IN, via MapTrigtoTrig to use line to test the Trig or not. But I am not well known about MapTrigtoTrig in my program is correct or not?  ps. I had read the reference of NI Trig in and Trig out and Check the discussion stream  on the forum.
0 Kudos
Message 1 of 6
(7,427 Views)

Hi,

What problems are you seeing? Do you get any errors?

Attached is an example that uses viMapTrigger (the VISA equivalent) to map Trig In to TTL0. It then waits for a trigger on TTL0 (you would provide an external signal on Trig In).

Looking at your mapping trigger code, nothing really jumps out at me as incorrect. You do not unmap the triggers in this code, and if you run it a second time, you will get an error -11 (for MapTrigtoTrig) saying that this route is already mapped.

What errors or incorrect behavior are you seeing? With that information, we can look closer at your code and track down where the problem is coming from.

Regards,

Missy S.
Project Engineer
RoviSys
0 Kudos
Message 2 of 6
(7,407 Views)
Thanks for your reply, however, after use your program in VxWork platform, I get stock in here "Can not open a VISA session to VXI0::1::INSTR", means that I can open the VISA-session.  How could I solve this problem.  thx a lot.
0 Kudos
Message 3 of 6
(7,385 Views)
Hi,
 
Try instead VXI0::0::INSTR instead of VXI0::1::INSTR. Does this change the behavior you are seeing? Have you run Resource Manager (resman) before running this program (ie- only after each hardware change in the VXI chassis)?
 
Regards,
Missy S.
Project Engineer
RoviSys
0 Kudos
Message 4 of 6
(7,366 Views)
Hi,
the old problem had been finished by instead ::0 of ::1(Cause the solt number).   Really appreciated!!  ^_^
 
Now,  I have to trigger out a signal when I trigger in a signal.  The code that I attach is modifed  from your origin triggering.c , and I want to set the trigger out in HANDLER part.
 
How should I do?
 
Thanks,
 
Best regard ,
 
                                                                maxsophel
0 Kudos
Message 5 of 6
(7,343 Views)
I think the most important thing is I want to set AssertTrigger in Trigger IN 's Function Handler,
 
so, the original Function will be like this,
 
ViStatus _VI_FUNCH myTrigOrig(ViSession instrIN, ViEventType etype, ViEvent event, ViAddr userhandle);
But I don't know how to set ViSession instrOUT in this handler.
 
thanks a lot
 
best Regard,
maxsophel
0 Kudos
Message 6 of 6
(7,322 Views)