02-20-2011 11:42 PM
Hi,
I hjave a script in which it says channel.asc open and write . What does it mean? where will it create that .asc file? what is the necessitty of doing it so?
Here is the script below. Please any one let me know why is it required?
Sub channel_asc
AUTODRVUSER=AUTODRVUSERTMP_
Call FILEOPEN(AutoDrvUser & "Channel.asc", 0)
Call FILEWRITELN(AutoDrvUser & "Channel.asc", 1, " ")
L1=1
Do While L1<=ACTCHNNO
If CHNNAME(L1)<>" " Then
Call FILEWRITELN("Channel.asc", 1, CHNNAME(L1))
Else
L1=ACTCHNNO
End If
L1 = L1 + 1
Loop
Call FILECLOSE("Channel.asc")
AUTODRVUSER=AUTODRVUSER_
End Sub
Thanks in advance.
Rsh
Solved! Go to Solution.
02-21-2011 07:11 AM
Hi RSH,
The script you posted does one thing only-- creates a new file called "Channel.asc" and fills it with the names of all the channels currently present in DIAdem. The "Channel.asc" file is created in the directory stored in the variable "AutoDrvUser", which is the old variable that stores the current default directory for reading and writing data files. Usually it contains the folder that you last loaded a data file from (interactively). The *.asc file extension stands for ASCII, meaning a text file, which this is.
Brad Turpin
DIAdem Product Support Engineer
National Instruments