Hallo,
ich bin ziemlich neu bei LabView(Version 8.0) und muss über VISA
(Version 3.2)mit eine RS232 arbeiten. Visa ist schon im PC (XP)
installiert, aber leider jedes mal wenn ich mit Write und Read arbeiten
möchte bekomme ich eine Fehlermeldung, dann habe ich hier im Forum
gelesen, dass man eine Schleife mit eine Warte Zeit zwischen Write und
Read einbauen muss. Aber jetzt bekomme ich eine Warnung mit der
Fehlercode 1073676294. Und Visa Read Funktionniert offensichtlich
nicht. was soll ich dagegen tun? Könnten es sein, dass der Treiber
nicht richtig installiert ist?
Danke für jede nützliche Antwort.
Hi,
there is a Power Supply controller connected at my PC trough the RS232
and the Baudrate, stopbits, parity and Databits are correct
initialised.
What must I do whith the Hyperterminal?
Thanks
wenn möglich ist es besser, hier in Englisch zu schreiben, dann können mehr Leute davon profitieren...
The error code 1073676294
as described means: 'VISA: (Hex 0x3FFF0006) The number of bytes
transferred is equal to the requested input count. More data might be
available.'.
This is a result of a IMHO 'crossminded' approach in the VISA usage.
Finally this means that you got the requested number of bytes, but VISA
is unsure if there are some more. I usually ignore this message as long
as I got the result I expected.
What to do?
1. Check the result of VISA read if your expected answer was received.
If so and if its error code is the above mentioned number, than use the
result and replace the error cluster with a no-error constant. Else if
there was an error, stop reading and return this error (result might be
returned as well). If there was no error but not yet the complete
expected answer was received, than your delay between write and read
should be increased and you should retry the whole process.
2. If the expected answer of the device always has a kind of
termination character (usually a /r or /n or /r/n in '/'-display mode;
this is 0x0d, 0x0a or 0x0d0a in hex mode and represent the ASCII
control characters for carriage_return CR and line_feed LF), you may
set this termination character, enable it and always ask for the
longest possible answer of your device. In this mode the VISA stops
reading when the termination character was detected, so it reads one
line of answer at a time.
You may want to search the examples, for instance 'Advanced Serial Write and Read.vi' in order to get a good starting point.
Alberts answer pointed you to using Microsoft's Hyperterminal HT to
test the hardware connection. This is probably easier to do than
with LabVIEW, just to ensure the device, cable and port are operating
as expected. If you are not familiar with HT you might either read its
manual or skip this step completely.