Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

6536 how to set up simple handshaking in C#

I desperately need help to set up handshaking for PCIe-6536

The following code throws exceptions:

 

                // triggers

                myTask.Triggers.HandshakeTrigger.Interlocked.Source = "PFI0";

                myTask.Triggers.HandshakeTrigger.Type = HandshakeTriggerType.Interlocked;

                myTask.Triggers.HandshakeTrigger.Interlocked.AssertedLevel = InterlockedHandshakeTriggerAssertedLevel.Low;

 

                // events

                myTask.ExportSignals.HandshakeEventOutputTerminal = "PFI1";

                myTask.ExportSignals.HandshakeEventOutputBehavior = HandshakeEventOutputBehavior.Interlocked;

                myTask.ExportSignals.HandshakeEventInterlockedAssertedLevel = HandshakeEventInterlockedAssertedLevel.Low;

                myTask.ExportSignals.HandshakeEventInterlockedAssertOnStart = true;

 

                // Timing

                myTask.Timing.ConfigureHandshaking(SampleQuantityMode.ContinuousSamples, 4096);

                myTask.Timing.HandshakeDelayAfterTransfer = 0.0;

                myTask.Timing.HandshakeSampleInputDataCondition = HandshakeSampleInputDataCondition.HandshakeTriggerAsserts;

 

and it throws an exceptions:

"Specified property is not supported by the device or is not applicable to the task.\n\nProperty: NationalInstruments.DAQmx.Timing. HandshakeEventInterlockedAssertOnStart \n\nTask Name: _unnamedTask<0>\n\nStatus Code: -200452"

"Specified property is not supported by the device or is not applicable to the task.\n\nProperty: NationalInstruments.DAQmx.Timing.HandshakeSampleInputDataCondition\n\nTask Name: _unnamedTask<0>\n\nStatus Code: -200452"

 

Thank you

0 Kudos
Message 1 of 7
(5,023 Views)

Hello,

 

The error that you are getting happens when the device or property does not support the value that you are trying to give it. The device does support handshaking, so the error must be the type of handshaking and configuration. There is an Example for CVI, that shows handshaking for the 6536. If you go to C:\Users\Public\Documents\National Instruments\CVI\Samples\DAQmx\Digital\Handshaking\8255 you will find two examples on how to do handshaking with the 6536. Please let me know if you have further questions, but this example is very clear on what properties you can use with the card that you have.

 

Regards,

Sal H.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 7
(4,983 Views)

Thanks for references.

I think my question has been resolved: my board is PCIe-6536B (not PCIe-6536), 'B' stands for 'burst' and it supports burst handshaking. It doesn't support 8255 handshaking. I have received this information from NI support.

PCIe-6536 does support 8255 handshaking.

 

Thanks you.

0 Kudos
Message 3 of 7
(4,971 Views)

Apparently I have been misled by NI support. NI documentation (http://digital.ni.com/public.nsf/allkb/F5E8B94EC88D4BDC86257AA90050E743) claims that "There are no functional changes to version B of the NI PCIe-6535/36/37 and it is drop-in compatible with existing code".  Version B should also support 8255 handshaking. 

 

 

 

0 Kudos
Message 4 of 7
(4,916 Views)

Hello,

 

Sorry to hear about that. Have you gotten the handshaking to work?

If not, would it be a problem if you use C++ or are you restricted to C#? Also, what are you trying to handshake with?

 

Regards,

 

Sal H.
Applications Engineer
National Instruments
0 Kudos
Message 5 of 7
(4,890 Views)

No, I didn't make it work, though, as I have mentioned already, this code works for NI-6533. I don't think that language is matter. I have tried to run LabVIEW NI example (handshaking) for and it also fails for NI-6536, though it works fine for NI-6533.

 

Thanks,

0 Kudos
Message 6 of 7
(4,884 Views)

Hello, 

 

I am sorry that you have not gotten this handshaking example to work with your card. I see in the comments that the example works with the 6535/6. So, I will try to run them here and see what changes I have to make to make them work. Please keep me updated if you figure something out in the mean time. 

 

Thank you

Sal H.
Applications Engineer
National Instruments
0 Kudos
Message 7 of 7
(4,824 Views)