LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

can I understand QuickBASIC for old instrument example

we have some instrument such as 6517B Electrometer and mutliScan 1200

all example writing in QuickBASIC

we need to know some basic instruction of QuickBASIC like

for 6517B example

 

'Example program to demonstrate taking readings on different
'scanner channels
'For QuickBASIC 4.5 and KPC-488.2/CEC interface card
'Edit the following line to where the QuickBASIC
'libraries are on your computer
'$INCLUDE: 'c:\qb45\ieeeqb.bi'
'Initialize the interface as address 21
CALL initialize(21, 0)
'Reset controls in INIT, ARM;LAY1, ARM:LAY2, and TRIG subsystems
'and put trigger model in IDLE state, set function to volts
CALL SEND(27, "*rst", status%)
'Close channel 1, take voltage reading
CALL SEND(27, "rout:clos (@1);:read?", status%)
reading$ = SPACE$(80)
CALL ENTER(reading$, length%, 27, status%)
PRINT reading$
'Close channel 2, take current reading
CALL SEND(27, "func 'curr:dc'", status%)
CALL SEND(27, "rout:clos (@2);:read?", status%)
reading$ = SPACE$(80)
CALL ENTER(reading$, length%, 27, status%)
PRINT reading$
'Close channel 3, take ohms reading
CALL SEND(27, "func 'res'", status%)
CALL SEND(27, "rout:clos (@3);:read?", status%)
reading$ = SPACE$(80)
CALL ENTER(reading$, length%, 27, status%)
PRINT reading$

or for multiscan 1200

Reading HLL Data from Thermocouple & Volts Cards
TempScan/1100
Example 15c. HLL64.BAS Program
(1) CLS : PRINT “The TempScan/1100 is resetting...”
PRINT #1, “OUTPUT 07;*RX”
(3) SLEEP 4
(4) WHILE (S% AND 4) = 0
PRINT #1, “SPOLL 07"
INPUT #2, S%
(7) WEND
(8) PRINT #1, “OUTPUT 07;C1-32,3X”
(9) PRINT #1, “OUTPUT 07;C33-64,14X”
(10) PRINT #1,“OUTPUT07;Y1,0,0X”
(11) PRINT #1,“OUTPUT07;T1,1,0,0X"
(12) PRINT “The TempScan/1100 is collecting HLL data for all 32 channels”
PRINT “Hit a key to start or stop retrieving HLL data...”
(14) WHILE INKEY$ = “”: WEND
(15) WHILE INKEY$ = “”
PRINT #1, “OUTPUT 07;U4X”
PRINT #1, “ENTER 07"
LINE INPUT #2, U$
(19) FOR i = 1 TO 32
PRINT “High, Low and Last readings of Channel”; i
PRINT MID$(U$, (i * 66) - 65, 66)
NEXT i
(23) FOR i = 1 TO 32
PRINT “High, Low and Last readings of Channel”; i + 32
PRINT MID$(U$, (32 * 66) + (i * 78) - 77, 78)
NEXT i
(27) WEND

thanks for ALL

 

 

0 Kudos
Message 1 of 7
(2,561 Views)

I would suggest this be moved to the "Quick Basic" Forum in the LabVIEW Community, but there is no such Forum.  However, if you go to QBasic.net, you can find QBasic Tutorials, including "QBasic for Beginners".

 

Bob Schor

0 Kudos
Message 2 of 7
(2,496 Views)

Thank you very much

0 Kudos
Message 3 of 7
(2,491 Views)

Do you want to convert the QBasic program to LabVIEW? I don't know QBasic, but look at the first program you posted if nothing more than communications over a GPIB interface. You can use VISA and LabVIEW to mimic the communications. In that first program, the machine code commands are given. It looks like you have a GPIB device at address 21 and you reading various values. Do you have a manual for the device?

 

mcduff

0 Kudos
Message 4 of 7
(2,488 Views)

thank

Do you want to convert the QBasic program to LabVIEW?

yes

Do you have a manual for the device?

yes

thank's moreHeart

 

0 Kudos
Message 5 of 7
(2,436 Views)

The question McDuff didn't ask is "Do you know, and have experience with, LabVIEW?".  If yes, then (from your manual and knowledge of QuickBASIC) develop the LabVIEW code that duplicates (and extends?) the funcionality of the QuickBASIC routines you posted.  If No, then learn LabVIEW (plenty of tutorial material -- see first page of Forum, and books, and classes) or hire a developer (should be a relatively quick project).

 

Bob Schor

0 Kudos
Message 6 of 7
(2,404 Views)

Ditto what the others said!

 

Spoiler
The first version of my model railroad control was written in QuickBasic. That was a long time ago!

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 7
(2,396 Views)