Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Parallel port IO via C# and NI-VISA?

71 views
Skip to first unread message

KIJO

unread,
Nov 4, 2004, 3:44:47 AM11/4/04
to
Is it possible to make simple IO via a parallel port (LPT1) with C#
(.NET) and NI-VISA (NationalInstruments.VisaNS.dll 7.0.0.341)?
I have to send simple escape-sequences and should recieve simple
ASCII-text.

Sergei

unread,
Nov 5, 2004, 3:06:34 AM11/5/04
to
I guess that you need to set some attributes,pls see my exsample
bellow:

viSetAttribute (vi, VI_ATTR_ASRL_END_IN, 2);
viSetAttribute (vi, VI_ATTR_TERMCHAR_EN, 1));
viSetAttribute (vi, VI_ATTR_TERMCHAR, TermChar);

KIJO

unread,
Nov 5, 2004, 8:12:42 AM11/5/04
to
Dear Sergei,
once more many thanks for your help.
At the moment however I can not find the correct way respective the
correct DLL-file so that I can call the function viSetAttribute().
Under NI-.NET I can not find this function, so I think I have to
include a further C++-DLL-file, I'm I right?
May be you can give me once more a short answer.
Thank you and have a nice weekend.

Greetings
Josef Kitzbichler

Sergei

unread,
Nov 5, 2004, 8:42:39 AM11/5/04
to
Hello Josef , You can use the Attribute Type Object in C# which
specifies the .NET interface to NI-VISA driver-level attributes. Have
a nice weekend too and I hope you have to solve that problem soon. Br,
Sergei

KIJO

unread,
Nov 10, 2004, 6:00:54 AM11/10/04
to
Dear Sergei,
thank you once more for your answer.
Unfortunately my NI-VisaNS.dll version (7.0.0.341)
does not support all hardware parameter properties and therefore also
not the SetAttribute??() and GetAttribute??()-methods so I can not set
your proposed parameters.
Meanwhile I have found another No-NIVisa-way to communicate with the
LPT1 and it works.
So don't worry any more about my problem.
Thank you for all your efforts and have a nice time.
Greetings Josef Kitzbichler
0 new messages