LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

serial port

Dear all !

Firstly I'm using labview 6.0 for 5 days so I'm not yet skilled ( I
hope that one day I will be ). I have a program which should talk to
the serial port and read from it . Thermometer Lakeshore 201 is
connected to the serial port. I have looked into the manual of
Thermometer and there I have found a qbasic program which is doing a
same thing I wont to do in labview . There I have found a parameters
to configure a VISA serial port . But the program which I wrote is not
working . It is giving me all the time just zero . I don't know what I
have done badly . I check also this small program in qbasic and it is
working well. labview is not giving me any error , but result is
always zero. I have looked for any possible explanation but without
succe
ss ( But I'm a mere novice) . Special commend for an instrument
is WS . That I have found as well in the manual .


Any help would be greatly appreciated
Regards
Alexandra


STARTUP: OPEN "COM1:300,O,7,RS" FOR RANDOM AS #1
PRINT "TYPE 'QUIT' TO EXIT"
RESTART: PRINT
INPUT "ENTER COMMAND"; A$
IF A$ = "QUIT" THEN GOTO FINISH
A$ = A$ + CHR$(13) + CHR$(10)
PRINT #1, A$;
R = INSTR(A$, "W")
IF R = 0 THEN GOTO REJUMP
FOR Z = 1 TO 500: NEXT Z
LINE INPUT #1, B$
PRINT B$
REJUMP: GOTO RESTART
FINISH: CLOSE #1
END
0 Kudos
Message 1 of 5
(2,473 Views)
Find attached a link to a similar question I posted some weeks ago. I also attached the final version of my VI. Make sure you use the right information to configure your serial port (baud rate, data bits, termination character, etc.). You may also need to use MAX to confirm your VISA resource name.

http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=506500000008000000AE2F0000&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0
0 Kudos
Message 2 of 5
(2,473 Views)
Alexandria,
If you post your code it would be easy for an experienced programmer to find your problem. My guess is that you have configured for comm 1, by asking for port 1. In LabVIEW port 0 is comm 1, port 1 is comm 2, et cetera. Try changing the port number. And of course make sure the other port settings are correct.

Hope this helps,
Bill Kemmerer
0 Kudos
Message 3 of 5
(2,473 Views)
"Kemmerer" wrote in message
news:5065000000050000004F590000-1007855737000@exchange.ni.com...
> Alexandria,
> If you post your code it would be easy for an experienced programmer


Where are we meant to post code when we need to? Since this isn't a
binary's group, I always assumed we shouldn't post it here
0 Kudos
Message 4 of 5
(2,472 Views)
If you are accessing this group through NI's site, just click on the button "Attach Files". If you are using a news reader to connect to comp.lang.labview, when you post a message, just use your news reader's file attachment function.
0 Kudos
Message 5 of 5
(2,473 Views)