VXI and VME

cancel
Showing results for 
Search instead for 
Did you mean: 

libvxi EnableTrigSense for ON/OFF protocol fails

One of our custom VXI board developers has a board that holds TTL Trigger line 6 low on certain startup conditions. Once intialized, the board releases 6 to the floating high state. I coded the following snippet (with appropriate InitVXILibrary, etc.) to try to use the ON/OFF protocol. My intent to detect when the board is happy (6 is released) from NI-VXI library code on our Linux host with PCI-MXI-2 card in place.

rc = EnableTrigSense(-1, 6, 1); // 1 == OFF

I get a run-time failure code of -3, which thedocumentation says is invalid line or protocol. I get the same for protocol 0 (ON). But if I specify protocols 2, 3, 4, 5, or 6 (START, STOP, SYNC, SEMI-SYNC, and ASYNC repsectively), then the Enable succeeds, but of co
urse is not what I want.

Have I misunderstood the ON/OFF protocol to be what I want to use? Why is it being rejected by the Enable call?
0 Kudos
Message 1 of 6
(6,039 Views)
Hi Mike,

I am trying to look into this for you. It sounds like you are working with a VXI chassis over a MXI-2 link (PCI-MXI-2 to VXI-MXI-2) to your Linux machine. I will need to to reference the documentation on this particular call to refresh my memory and probably try to set up some hardware. I do have a couple of questions though. First, what version of Linux are you working with. Also, what programming language are you using? Lastly, I believe you should be working with NI-VXI version 2.0 (since you are working with Linux). Is this correct?

Thanks for your patience, I'll let you know what I find as soon as possible.

Regards,

Julia Dinolfo
Applications Engineering
National Instruments
0 Kudos
Message 2 of 6
(6,039 Views)
All your assumptions are correct. We are working under RH7.2, due to limitations with drivers for other hardware. And generally using C++, but if there's a need to drop down to C for some reasons for these portions that's fine too.
0 Kudos
Message 3 of 6
(6,039 Views)
Hi Mike,

I've been looking into a couple of options for you. First of all, I believe that instead of using the "ON/OFF" protocol, you can also use the "START/STOP" protocol. The only difference between the two is that one of them is synchronized to the CLK10 edge (I believe the START/STOP protocol). The EnableTrigSense funtion is more for the case of when you would like to synchronize signals with the trigger.

Another option is to use the GetVXIbusStatus function. This sounds more like what you would want. You can use it to poll the VXIbus. It returns a structure containing the state of the lines (including the TTL Trigger lines). For more help with this function you can refer to the "NI-VXI API Help".

As for the "ON/OFF" protocol in t
he EnableTrigSense function, I have not yet been able to round up a test machine with Linux to verify your problem. I will file a corrective action request against your problem though, and we will look into this further.

I think you should be able to work with one of these options. Thank you for your feedback. Let me know if you have any other questions or comments.

Regards,
Julia Dinolfo
Applications Engineering
National Instruments
0 Kudos
Message 4 of 6
(6,039 Views)
I tried using GetVXIbusStatus and it seems to be sufficient for what I want to do. Thanks.

My 2 cents: a decent and complete index might have helped me find that sooner too, without needing support help. Or "See also" references for each function.
0 Kudos
Message 5 of 6
(6,039 Views)
Great to hear! I have passed on your suggestion as well.
0 Kudos
Message 6 of 6
(6,039 Views)