05-05-2009 10:17 PM
This is my source code:
But when these code running, I found wasting long time for open a serial resource,wha's problems?
SerialSession serialResource = null;
try
{
serialResource = (SerialSession)ResourceManager.GetLocalManager().Open(devResource);
}
catch(Exception ex)
{
throw new Exception(ex.Message);
}
serialResource.BaudRate = 38400;
serialResource.DataBits = 8;
serialResource.StopBits = StopBitType.One;
serialResource.Parity = Parity.None;
serialResource.FlowControl = FlowControlTypes.None;
return serialResource;
05-07-2009 03:11 AM
05-10-2009 09:50 PM
Hi,
I will wait for about one minute, and following operation to the serialPort is OK, such as Read/Write!
The VISA version that i installed is 3.5, the setup file is visa350full.exe.
Thanks you!
05-11-2009 09:45 PM
Hello,
I'm not familiar with VISA programming in C#. But maybe you can refer to this example and see if you still have the problem when using this example code.
Thanks.
http://zone.ni.com/devzone/cda/epd/p/id/4859
NI Application Engineer