11-16-2015 12:17 PM
I want to configure 6536B device for digital read with 8255 handshaking.
myTask = new Task();
myTask.DIChannels.CreateChannel("Dev1/port0_32", "", ChannelLineGrouping.OneChannelForAllLines);
// triggers
myTask.Triggers.HandshakeTrigger.Interlocked.Sourc
myTask.Triggers.HandshakeTrigger.Type = HandshakeTriggerType.Interlocked;
myTask.Triggers.HandshakeTrigger.Interlocked.Asser
// events
myTask.ExportSignals.HandshakeEventOutputTerminal = "PFI1";
myTask.ExportSignals.HandshakeEventOutputBehavior = HandshakeEventOutputBehavior.Interlocked;
myTask.ExportSignals.HandshakeEventInterlockedAsse
// - not supported! myTask.ExportSignals.HandshakeEventInterlockedAsse
// Timing
myTask.Timing.ConfigureHandshaking(SampleQuantityM
myTask.Timing.HandshakeDelayAfterTransfer = 0.0;
// - not supported! myTask.Timing.HandshakeSampleInputDataCondition = HandshakeSampleInputDataCondition.HandshakeTrigger
reader = new DigitalSingleChannelReader(myTask.Stream);
myTask.Control(TaskAction.Verify);
myTask.Start();
digitalCallback = new AsyncCallback(DigitalCallback);
reader.BeginReadMultiSamplePortUInt32(5, digitalCallback, myTask);
and later...
private void DigitalCallback(IAsyncResult ar)
{
data = reader.EndReadMultiSamplePortUInt32(ar);
...
}
reader throws 'timeout' exception.
This code has been created after old C++ based code for NI 6533 device which works fine. Two code lines labeled 'not supported' cause 'not supported' exceptions for NI 6536B device.
Can somebody point me to example for digital read with 8255 handshaking?
Thank you,
11-17-2015 02:04 PM
When you say that it is not supported, what do you mean? Can you please attach a screenshot of the error that you are getting? What are you trying to handshake with? Can you give a little more background on this?
You are right, the example is for 6533 and needs to be updated, however, if you are abiding by the 8255 standards, the code should work after a few tweaks. I will do a little more research in the mean time.
Regards,
11-17-2015 02:11 PM
NI support confirms that NI 6536B doesn't support 8255 handshaking, but NI 6536 does. That is why some properties are not supported.
Thanks,