Script language (ex: Perl) in LabVIEW
Hello,
It is possible to implement script language in LabVIEW?
Currently i have only one idea, install on computer Perl and use
Communications\System exec.vi.
Other variants?
Deniss Karai
[email protected]
LabVIEW currently supports script nodes to interface with Matlab and HiQ. If
you think that it would benefit to have other script interfaces (like TCL
and Perl) you can submit your request to NI on the LabVIEW wish list.
Jean-Pierre Drolet
"Kevin B. Kent" a écrit dans le message news:
[email protected]..
> Danny Thomson wrote:
>
> > Hi Jens-Achim,
> >
> > I have tried the link you suggested and it does not work for me, could
you
> > please
> > let meb know if there is one that still works. I am new to Labview but
used
> > Tcl/Tk on Unix for a long
> > time. I would be very grateful for some type of pointer how to setup the
> > interface
> >
> > regards
> >
> > Danny
> >
> > Jens-Achim Ke
ssel wrote:
> >
> > > Hi,
> > >
> > > You should have a look at
> > > http://dev.ajubasolutions.com/
> > > The TCL shell is a very powerful bytecompiling interpreter, that can
be
> > > implemented using simple DLL/LIB-calls. It's free.
>
> You have a few options.
> 1) Use the SysExec and Wish (for TCL, Perl may have similar) to call
scripts.
> 2) Make a DLL (or platform equivalent) and use the Call Library Function.
> 3) I saw an ad for something called LabScript but I can not find it now.
> Kevin Kent
>
Similar Messages
-
Favourite shell / scripting language?
hi DBA's
i'm just wondering what your favourite shell (csh,sh,ksh etc.) / scripting language is (perl,python etc)?
where do you write/run your database scripts?
thanks a lot for sharing your experience.Digging through the archives I found this unanwsered poll. Today scripting languages are much more mature and refined but my answer can only be Python.
-
Your favourite shell / scripting language????
I am going to learn Scripting in Unix (mainly Solaris) . So i thought of asking you DBA gurus around the world what your favourite scripting language (Python, Perl,.. etc) is and your favourite Shell (csh,sh,ksh) . I found a similair post favourite shell / scripting language?
which was answered after two years(!!!) with only one reply. I guess i'll be lucky to get more than one perspective this time.The way I remember it, having use these since 1983, is:
- Originally we had the Bourne Shell (/bin/sh), also known as 'Shell'
- Then came the C shell (/bin/csh) with real programming constructs.
- Then a number of programming capabilities were retrofit to Shell
- Then the Korn shell (/bin/ksh) was created to bring C shell capabilities to Shell
- Then a variant of the Korn Shell was placed in the public domain (/bin/pdksh)
- Then Bourne Again shell was created as a superset of Korn shell (/bin/bash)
Seems like a number of people say 'sh' when they mean 'BAsh'. In which case, there should be little advantage to going back to ksh. However, there are many advantages to going up to bash.
http://www.faqs.org/docs/linux_intro/x7132.html -
Perl versus other "scripting" languages when doing string operations
I've been told that perl is a "scripting" language like the other languages mentioned in this forum.
If that's true, can these other languages handle the following spec as well as perl can? (See spec at end of this post.)
Or is perl stronger in string operations than the other scripting languages mentioned here?
Here's the spec:
1. I give your program a twenty-letter alphabet (any twenty letter alphabet)
For example:
ABCDEFGHIJKLMNOPQRST
2. I also give your program four groups (any four groups) of letters in this alphabet:
For example:
s: A,B,C,D,E
p: F,G,H,I,J
d: K,L,M,N,O
e: P,Q,R,S,T
3. I also give your program a sequence over the twenty-letter alphabet that I gave you in Step (1) above:
For example:
ABCDEFGHIJKLMNOPQRSTSRQPONMLKJIHGFEDCBA
4. Given this sequence,you search for pairs of adjacent letters (x,y) where X and y are from different groups (the groups defined in Step (2) above.)
Also, you return the results of this search by giving me back the following two strings:
ABCD(EF)GHI(JK)LMN(OP)QRSTSRQ(PO)NML(KJ)IHG(FE)DCBA
ABCD(sp)GHI(pd)LMN(de)QRSTSRQ(ed)NML(dp)IHG(ps)DCBA
5. Note: if I give you a sequence that contains "overlapping" ordered pairs like:
...EFK...
then you ignore the second ordered pair. That is, you return:
...(EF)KOK - here is the final stuff on the "C" side.
To execute the program, the command line is:
20let.exe file1.txt file2.txt file3.txt > fileout.txt
Below, I've provided:
a) source code 20let.c
b) sample input file1.txt
c) sample input file2.txt
d) sample input file3.txt
e) output fileout.txt generated from these input files.
As soon as Bill finishes the perl version of the source code, I'll post that also.
source code of 20let.c
// 20let.c5
#include <stdio.h>
#include <stdlib.h>
int T[333],A[99999],G[333],B[99999],C[99999],N[299999],P[99999];
int n1,n2,f,p,x1,x2,n,m,a,b,c,i,j,k,x,y,z;
int E[233][233];
FILE *file;
int substrings(int x1,int x2);
int main(int argc, char*argv[]) {
if(argc<3){
printf("\nusage:20let protein-file nucleotide-file pairs-include-file\n\n");
printf("marks amino-acid-pairs from different groups in protein-file\n");
printf("iff they are in the include-file\n");
exit(1);
//----------------define the groups G['I'] = 's', e.g.
x='s'; G['I']=x;G['M']=x;G['V']=x;G['A']=x;G['G']=x;
x='p'; G['F']=x;G['L']=x;G['P']=x;G['W']=x;G['W']=x;
x='d'; G['H']=x;G['Q']=x;G['D']=x;G['E']=x;G['E']=x;
x='t'; G['S']=x;G['T']=x;G['Y']=x;G['N']=x;G['C']=x;G['K']=x;G['R']=x;
//----------------the 4 bases T['a'] = 0 thru 3
for(x=0;x<222;x++)
T[x]=-999;
T['a']=0;T['c']=1;T['g']=2;T['t']=3;
T['A']=0;T['C']=1;T['G']=2;T['T']=3;
for(i=65;i<70;i++)G<i>='s';
for(i=70;i<75;i++)G<i>='p';
for(i=75;i<80;i++)G<i>='d';
for(i=80;i<85;i++)G<i>='t';
//---------------- read include-file file3 xxxyyy pairs E[x][y] of interest
f=0;
for(x=0;x<222;x++)
for(y=0;y<222;y++)
E[x][y]=0;
if((file=fopen(argv[3],"rb"))==NULL){
printf("\ncan't open exclude-file %s\n",argv[1]);exit(1);
mq1: if(feof(file))
goto mq3;
x=fgetc(file);y=fgetc(file);x=fgetc(file);
x=T[fgetc(file)]*16+T[fgetc(file)]*4+T[fgetc(file)];
y=T[fgetc(file)]*16+T[fgetc(file)]*4+T[fgetc(file)];
if(x<64 && x>=0 && y<64 && y>=0){
E[x][y]=1;
f++;
mq2: if(feof(file))
goto mq3;
a=fgetc(file);
if(a!=10)
goto mq2;
goto mq1;
mq3: fclose(file);
//------------------read amino-acid file file1 == P array
if((file=fopen(argv[1],"rb"))==NULL){
printf("\ncan't open file %s\n",argv[1]);exit(1);}
p=0;
m1p: if(feof(file))
goto m2p;
p++;
P[p]=fgetc(file);
if(G[P[p]]==0)
p--;
goto m1p;
m2p:;
fclose(file);
//------------------read nucleotide file file2 == N array
if((file=fopen(argv[2],"rb"))==NULL){
printf("\ncan't open file %s\n",argv[1]);exit(1);
n=0;
m1n: if(feof(file))
goto m2n;
n++;
N[n]=fgetc(file);
if(N[n]!='a' && N[n]!='c' && N[n]!='g' && N[n]!='t')
n--;
goto m1n;
m2n:;
fclose(file);
//for(i=1;i<=p;i++)printf("%c",P<i>);printf("\n");
//for(i=1;i<=n;i++)printf("%c",N<i>);printf("\n");
//printf("%i include-pairs %i nucleotides %i proteins\n",f,n,p);
//------------1st line------------------ B<i> = result
m=0;
for(i=1;i<=p;i++){
n1=T[N[i*3-2]]*16+T[N[i*3-1]]*4+T[N[i*3]];
n2=T[N[i*3+1]]*16+T[N[i*3+2]]*4+T[N[i*3+3]];
//printf("\ni=%i p=%i n1=%i n2=%i\n",i,p,n1,n2);
if(E[n1][n2]<1 || G[P<i>]==G[P[i+1]] /* || i==n */){
printf("%c",P<i>);
m++;
B[m]=P<i>;
goto m3;
printf("(%c%c)",P<i>,P[i+1]);
i++;
m++;
B[m]='(';
m++;
B[m]=P[i-1];
m++;
B[m]=P<i>;
m++;
B[m]=')';
//printf("(%c)%c",G[A<i>],G[A[i+1]]);i++;
m3:;
printf("\n");
//------------2nd line------------------ C<i> = result
m=0;
for(i=1;i<=p;i++){
n1=T[N[i*3-2]]*16+T[N[i*3-1]]*4+T[N[i*3]];
n2=T[N[i*3+1]]*16+T[N[i*3+2]]*4+T[N[i*3+3]];
if(E[n1][n2]<1 || G[P<i>]==G[P[i+1]] /* || i==n */){
printf("%c",P<i>);
m++;
C[m]=P<i>;
goto m4;
printf("(%c%c)",G[P<i>],G[P[i+1]]);
i++;
m++;
C[m]='(';
m++;
C[m]=G[P[i-1]];
m++;
C[m]=G[P<i>];
m++;
C[m]=')';
//printf("(%c)%c",G[A<i>],G[A[i+1]]);i++;
m4:;
printf("\n");
//for(i=1;i<=m;i++)printf("%c",B<i>);printf("\n");
//------------3rd line------------------ printf only
m=0;
for(i=1;i<=p;i++){
n1=T[N[i*3-2]]*16+T[N[i*3-1]]*4+T[N[i*3]];
n2=T[N[i*3+1]]*16+T[N[i*3+2]]*4+T[N[i*3+3]];
if(E[n1][n2]<1 || G[P<i>]==G[P[i+1]] /* || i==n */){
printf("%c%c%c",N[i*3-2],N[i*3-1],N[i*3]);
goto m33;
printf("(%c%c%c%c%c%c)",N[i*3-2],N[i*3-1],N[i*3],N[i*3+1],N[i*3+2],N[i*3+3]);
i++;
m33:;
printf("\n");
//--------------substrings------------
substrings(20,29);
substrings(30,39);
substrings(40,49);
substrings(50,59);
substrings(60,69);
return 0;
int substrings(int x1,int x2)
printf("\n");
printf("lengths %i - %i : \n",x1,x2);
for(i=1; i<p; i++)
for (j=i+x1; j<i+x2; j++) {
if (C<i>>95 && C[j]>95) { // if lc letter in line2
for(x=i;x<=j;x++)
printf("%c",C[x]);
printf("|");
for(x=i;x<=j;x++)
if(B[x]>44) // if not () in line 1
printf("%c",B[x]);
printf("|");
for(x=i;x<=j;x++)
if(C[x]>95) // if lc letter line2
printf("%c",C[x]);
printf("\n");}
input file1.txt
MKKHTDQPIADVQGSPDTRH
IAIDRVGIKAIRHPVLVADK
DGGSQHTVAQFNMYVNLPHN
FKGTHMSRFVEILNSHEREI
SVESFEEILRSMVSRLESDS
GHIEMTFPYFVNKSAPISGV
KSLLDYEVTFIGEIKHGDQY
GFTMKVIVPVTSLCPCSKKI
SDYGAHNQRSHVTISVHTNS
FVWIEDVIRIAEEQASCELF
GLLKRPDEKYVTEKAYNNPK
FVEDIVRDVAEILNHDDRID
AYVVESEBFESIHNHSAYAL
IERD
input file2.txt
atgaaaaaacatactgatcaacctatcgctgatgtgcagggctcaccggataccagacat
atcgcaattgacagagtcggaatcaaagcgattcgtcacccggttctggtcgccgataag
gatggtggttcccagcataccgtggcgcaatttaatatgtacgtcaatctgccacataat
ttcaaagggacgcatatgtcccgttttgtggagatactaaatagccacgaacgtgaaatt
tcggttgaatcatttgaagaaattttgcgctccatggtcagcaggctggaatcagattcc
ggccatattgaaatgacttttccctacttcgtcaataaatcagcccctatctcaggtgta
aaaagcttgctggattatgaggtaacctttatcggcgaaattaaacatggcgatcaatat
gggtttaccatgaaggtgatcgttcctgttaccagcctgtgcccctgctccaagaaaata
tccgattacggtgcgcataaccagcgttcacacgtcaccatttctgtacacactaacagc
ttcgtctggattgaggacgttatcagaattgcggaagaacaggcctcatgcgaactgttc
ggtctgctgaaacggccggatgaaaaatatgtcacagaaaaggcctataacaatccgaaa
tttgtcgaagatatcgtccgtgatgtcgccgaaatacttaatcatgatgaccggatagat
gcctatgttgttgaatcagaaaactttgaatccatacataatcactctgcatacgcactg
atagagcgcgac
input file3.txt
FA tttgcc
FA ttcgcc
FA tttgct
FA ttcgct
LK ttaaaa
LK ttgaaa
LK ttaaag
LK ttgaag
LS ctgctc
LS ctgctt
LS ctactc
LS ctactt
LT ctcacc
LT ctcact
LT cttacc
LT cttact
LY ctctac
LY ctctat
LY ctttac
LY ctttat
LG ctcggc
LG ctcggt
LG cttggc
LG cttggt
IP attccc
IP attcct
IP atcccc
IP atccct
IP attcca
IP attccg
IP atccca
IP atcccg
ML atgctc
ML atgctt
ML atgctc
ML atgctt
VL gtgctg
VL gtgcta
VL gtactg
VL gtacta
VS gtgtcc
VS gtatct
VS gtgtcc
VS gtatct
VT gtcacc
VT gtcact
VT gttacc
VT gttact
VS gtcagc
VS gtcagt
VS gttagc
VS gttagt
SL tcgctg
SL tcgcta
SL tcactg
SL tcacta
SP tctcca
SP tctccg
SP tcccca
SP tccccg
PV ccggtg
PV ccggta
PV ccagtg
PV ccagta
PG cccggc
PG cccggt
PG cctggc
PG cctggt
TL acgctg
TL acgcta
TL acactg
TL acacta
TP acgccg
TP acgcca
TP acaccg
TP acacca
AL gcttta
AL gctttg
AL gcctta
AL gccttg
AP gcgccg
AP gcgcca
AP gcaccg
AP gcacca
AP gctcca
AP gctccg
AP gcccca
AP gccccg
AN gctaat
AN gctaac
AN gccaat
AN gccaac
AS gccagc
AS gccagt
AS gctagc
AS gctagt
YP tatccg
YP tatcca
YP tacccg
YP taccca
HP catccg
HP catcca
HP cacccg
HP caccca
QR cagcga
QR cagcgg
QR caacga
QR caacgg
DL gatttg
DL gattta
DL gacttg
DL gactta
EN gaaaat
EN gaaaac
EN gagaat
EN gagaac
EK gaaaaa
EK gaaaag
EK gagaaa
EK gagaag
ER gagcga
ER gagcgg
ER gaacga
ER gaacgg
WR tggcga
WR tggcgg
RV cgggtg
RV cgggta
RV cgagtg
RV cgagta
RW cggtgg
RW cgatgg
SG agtgga
SG agtggg
SG agcgga
SG agcggg
GF ggtttt
GF ggtttc
GF ggcttt
GF ggcttc
GL gggctg
GL gggcta
GL ggactg
GL ggacta
GY gggtat
GY gggtac
GY ggatat
GY ggatac
GY ggttat
GY ggttac
GY ggctat
GY ggctac
GK ggaaaa
GK ggaaag
GK gggaaa
GK gggaag
GK ggcaag
GK ggcaaa
GK ggtaag
GK ggtaaa
GW ggctgg
GW ggttgg
GR gggcgg
GR gggcga
GR ggacgg
GR ggacga
GS ggcagc
GS ggcagt
GS ggtagc
GS ggtagt
output fileout.txt
MKKHTDQPIADVQGSPDTRHIAIDRVGIKAIR(HP)VLVADKDGGSQHTVAQFNMYVNLPHNFKGTHMSRFVEILNSHEREISVESFEEILRSM(VS)RLESDSGHIEMTFPYFVNKSAPISGVKSLLDYEVTFIGEIKHGDQYGFTMKVIVP(VT)SLCPCSKKISDYGAHNQRSH(VT)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(EK)YVT(EK)AYNNPKFVEDIVRDVAEILNHDDRIDAYVVES(EF)ESIHNHSAYALIERD
MKKHTDQPIADVQGSPDTRHIAIDRVGIKAIR(dp)VLVADKDGGSQHTVAQFNMYVNLPHNFKGTHMSRFVEILNSHEREISVESFEEILRSM(st)RLESDSGHIEMTFPYFVNKSAPISGVKSLLDYEVTFIGEIKHGDQYGFTMKVIVP(st)SLCPCSKKISDYGAHNQRSH(st)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(dt)YVT(dt)AYNNPKFVEDIVRDVAEILNHDDRIDAYVVES(dp)ESIHNHSAYALIERD
atgaaaaaacatactgatcaacctatcgctgatgtgcagggctcaccggataccagacatatcgcaattgacagagtcggaatcaaagcgattcgt(cacccg)gttctggtcgccgataaggatggtggttcccagcataccgtggcgcaatttaatatgtacgtcaatctgccacataatttcaaagggacgcatatgtcccgttttgtggagatactaaatagccacgaacgtgaaatttcggttgaatcatttgaagaaattttgcgctccatg(gtcagc)aggctggaatcagattccggccatattgaaatgacttttccctacttcgtcaataaatcagcccctatctcaggtgtaaaaagcttgctggattatgaggtaacctttatcggcgaaattaaacatggcgatcaatatgggtttaccatgaaggtgatcgttcct(gttacc)agcctgtgcccctgctccaagaaaatatccgattacggtgcgcataaccagcgttcacac(gtcacc)atttctgtacacactaacagcttcgtctggattgaggacgttatcagaattgcggaagaacaggcctcatgcgaactgttcggtctgctgaaacggccggat(gaaaaa)tatgtcaca(gaaaag)gcctataacaatccgaaatttgtcgaagatatcgtccgtgatgtcgccgaaatacttaatcatgatgaccggatagatgcctatgttgttgaatca(gaaaac)tttgaatccatacataatcactctgcatacgcactgatagagcgc
lengths 20 - 29 :
st)SLCPCSKKISDYGAHNQRSH(s|VTSLCPCSKKISDYGAHNQRSHV|sts
st)SLCPCSKKISDYGAHNQRSH(st|VTSLCPCSKKISDYGAHNQRSHVT|stst
t)SLCPCSKKISDYGAHNQRSH(s|TSLCPCSKKISDYGAHNQRSHV|ts
t)SLCPCSKKISDYGAHNQRSH(st|TSLCPCSKKISDYGAHNQRSHVT|tst
lengths 30 - 39 :
st)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(d|VTISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPDE|std
t)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(d|TISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPDE|td
t)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(dt|TISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPDEK|tdt
dt)AYNNPKFVEDIVRDVAEILNHDDRIDAYVVES(d|EKAYNNPKFVEDIVRDVAEILNHDDRIDAYVVESE|dtd
dt)AYNNPKFVEDIVRDVAEILNHDDRIDAYVVES(dp|EKAYNNPKFVEDIVRDVAEILNHDDRIDAYVVESEF|dtdp
t)AYNNPKFVEDIVRDVAEILNHDDRIDAYVVES(d|KAYNNPKFVEDIVRDVAEILNHDDRIDAYVVESE|td
t)AYNNPKFVEDIVRDVAEILNHDDRIDAYVVES(dp|KAYNNPKFVEDIVRDVAEILNHDDRIDAYVVESEF|tdp
lengths 40 - 49 :
st)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(dt)YVT(d|VTISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPDEKYVTE|stdtd
st)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(dt)YVT(dt|VTISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPDEKYVTEK|stdtdt
t)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(dt)YVT(d|TISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPDEKYVTE|tdtd
t)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(dt)YVT(dt|TISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPDEKYVTEK|tdtdt
dt)YVT(dt)AYNNPKFVEDIVRDVAEILNHDDRIDAYVVES(d|EKYVTEKAYNNPKFVEDIVRDVAEILNHDDRIDAYVVESE|dtdtd
dt)YVT(dt)AYNNPKFVEDIVRDVAEILNHDDRIDAYVVES(dp|EKYVTEKAYNNPKFVEDIVRDVAEILNHDDRIDAYVVESEF|dtdtdp
t)YVT(dt)AYNNPKFVEDIVRDVAEILNHDDRIDAYVVES(d|KYVTEKAYNNPKFVEDIVRDVAEILNHDDRIDAYVVESE|tdtd
t)YVT(dt)AYNNPKFVEDIVRDVAEILNHDDRIDAYVVES(dp|KYVTEKAYNNPKFVEDIVRDVAEILNHDDRIDAYVVESEF|tdtdp
lengths 50 - 59 :
t)RLESDSGHIEMTFPYFVNKSAPISGVKSLLDYEVTFIGEIKHGDQYGFTMKVIVP(s|SRLESDSGHIEMTFPYFVNKSAPISGVKSLLDYEVTFIGEIKHGDQYGFTMKVIVPV|ts
lengths 60 - 69 :
dp)VLVADKDGGSQHTVAQFNMYVNLPHNFKGTHMSRFVEILNSHEREISVESFEEILRSM(s|HPVLVADKDGGSQHTVAQFNMYVNLPHNFKGTHMSRFVEILNSHEREISVESFEEILRSMV|dps
dp)VLVADKDGGSQHTVAQFNMYVNLPHNFKGTHMSRFVEILNSHEREISVESFEEILRSM(st|HPVLVADKDGGSQHTVAQFNMYVNLPHNFKGTHMSRFVEILNSHEREISVESFEEILRSMVS|dpst
p)VLVADKDGGSQHTVAQFNMYVNLPHNFKGTHMSRFVEILNSHEREISVESFEEILRSM(s|PVLVADKDGGSQHTVAQFNMYVNLPHNFKGTHMSRFVEILNSHEREISVESFEEILRSMV|ps
p)VLVADKDGGSQHTVAQFNMYVNLPHNFKGTHMSRFVEILNSHEREISVESFEEILRSM(st|PVLVADKDGGSQHTVAQFNMYVNLPHNFKGTHMSRFVEILNSHEREISVESFEEILRSMVS|pst
st)RLESDSGHIEMTFPYFVNKSAPISGVKSLLDYEVTFIGEIKHGDQYGFTMKVIVP(st|VSRLESDSGHIEMTFPYFVNKSAPISGVKSLLDYEVTFIGEIKHGDQYGFTMKVIVPVT|stst
st)SLCPCSKKISDYGAHNQRSH(st)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(d|VTSLCPCSKKISDYGAHNQRSHVTISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPDE|ststd
st)SLCPCSKKISDYGAHNQRSH(st)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(dt|VTSLCPCSKKISDYGAHNQRSHVTISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPDEK|ststdt
t)SLCPCSKKISDYGAHNQRSH(st)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(d|TSLCPCSKKISDYGAHNQRSHVTISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPDE|tstd
t)SLCPCSKKISDYGAHNQRSH(st)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(dt|TSLCPCSKKISDYGAHNQRSHVTISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPDEK|tstdt
t)SLCPCSKKISDYGAHNQRSH(st)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(dt)YVT(d|TSLCPCSKKISDYGAHNQRSHVTISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPDEKYVTE|tstdtd
Edited by: David Halitsky on Mar 18, 2008 4:21 AM
Edited by: David Halitsky on Mar 18, 2008 4:22 AM -
Way to communicat​e with labview with my own scripting language
Hi guys
My objective is to design my own scripting language that can communicate(sending inputs and receiving outputs) with labView for my project. I do have little knowledge about labView . But I dont have any idea how to design scripting language or where to start learning about it since i dont have any computer science background. Can some one guide me about this??
Thanks in advanceWhy do you want to design your own scripting language? That wheel has already been invented. There's a free Python toolkit and a Lua toolkit that you can buy to do scripting in LabVIEW.
Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice -
Looking for a more universal scripting language than AppleScript or Automator
I want to learn a cross-platform/web scripting language to automate tasks, write scripts and with the potential to create programs and web apps.
I am looking for something that:
- is not a program with a GUI like Automator, iKey, Quickeys, Maestro...
- is more "universal" than Applescript, cross-platform
- can be used to automate simple tasks in a simple way
- can also be used to create more complex scripts, web apps and maybe, eventually, programs (with GUI)
I've read about Javascript, Python, Ruby, PHP, Perl, C+, C++, Java and others, but I really don't know.
- Java sounds pretty cool, Python too.
- I'm not crazy about PHP or Perl, with Javascript, but some people swear by it
- I don't know anything about C+, C++
Does anyone have any suggestion(s)? Please let me know if you need any more details. Thank you.C, C++, Objective-C are nor scripting languages and will not help you do web pages. (Don;t know what C+ is).
Forget Java it has lots of security problems and more and more users are disabling Java in their web browsers because of this. Developing in Java would be, in my opinion, a mistake.
If you are doing any web works at all you will need to know some Javascript, no way around that. But Javascript is actually not a bad language
Note Java and Javascript are two totally separate languages that have nothing in common but the first 4 letters of their names.
So you are left with PHP, Perl, Python and Ruby.
Dismissing PHP and Perl out of hand is a big mistake, They are both major players and you will run into them just about everywhere. If you are looking to do this for possible employment you will need to be familiar with them at least.
Python and Ruby are both strong languages as well. I don't have a lot of experience with either so I can;t speak to their strengths but learnign either would not be a mistake.
Knowing what your reasons are for asking this, personal use or for employment, might help refine the list some.
regards
Message was edited by: Frank Caggiano - Perl is also included in OS X by default. Not sure about PHP but I believe it also is. I agree TextWrangler would be a good editor for this type of work. -
Scripting Language Options for the Script Task Options SSIS 2012
Can python or perl be used as a script language in the drag and drop script task? I believe only VB.Net and C# are, but I see under SSDT Tools -> Options there are some choices for Python Debugging? I'd like to use python as my SSIS scripting language
in some cases. If it can not be used as the script task language, what are the Python options under Tools -> Options for?
Any experts out there who can illuminate?
Thanks allHello,
In SSDT in a SSIS Script task you can only use Visual Basic.NET and C#, no other programming / scripting languages.
SSDST is a plugin for Visual Studio and in VS you will find several options which are irrelevant for SSIS projects, like this Phyton debugging option.
Olaf Helper
[ Blog] [ Xing] [ MVP] -
New java-like scripting language w/ powerful regex
Hi,
Just wanted to let you know that there's now a new scripting language called P~ with the following important aspects:
1) matches and exceeds Perl regex solveability -- e.g. offers full regex-based boolean query on non-indexed corpus, offers completely general side-effects, more accurate than Perl code assertions
2) basic grammar is very Java like
3) regex grammar is algebraic, not metacharacter-based, leads to more readable and maintainable solutions to hard problems
4) offers an easy tool to debug matching behavior of your regexes (rules)
5) though a full featured scripting language, you can write scriptlets and call them from Java classes, with arguments. Allows you to use your regex solutions in Java applications.
6) the language is offered as a Java library, as well as a standalone application that runs the library. This means that your scripts can import java classes available in the classpath, you can leverage existing Java libraries.
Check out the website and try it out: http://ptilde.pbwiki.com
AndyTrue to an extent. We don't yet have lookaround assertions and won't have backreferencing any time soon. But there are same-time assertions which offer much of the same, and allow for boolean query.
More accurate general statement insertion side-effects (than Perl code assertions) means that your statements are executed if and only they wrap a subpattern that is part of the ultimate best match -- Perl code assertions execute when the automata encounters them, even if where they are in the regex is ultimately not part of the match, or even if there is no match at all. This aspect is a huge part of the solveability advantage.
As to the regex test cases, there are about 1000, and we will post them soon. -
High Level language Interprete​r in labVIEW?
This is a question of curiously: is anyone aware of any high level language interpreters written in LabVIEW?
I recently wrote my own BASIC like language interpreter as part of a custom LabVIEW test suite to allow scripting without needed to edit the LabVIEW source code and it got me wondering if anyone has done anything similar?
It could be BASIC, Pascal, C, etc.
I did find this one site that lists a tiny BASIC interpreter that has been ported to a lot of different languages (but not labVIEW):
https://sites.google.com/site/smallbasicinterpreters/source-code
so there seems to be a lot of interest out there.
My only google search hits for LabVIEW interpreters are for CNC G code.I've never used it personally but I think LabPython might be what you are looking for.
Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously. -
What programming/script languages do you know?
Hey, give us a list of what you know of programming/script languages. Here is mine:
C/C++, SQL (yes SELECT 1+1 works, so you can do programming in it), LUA, PHP, Python, Javascript some D (a good merge of C++ and Python), Makefile/autoconfig ,
some C# and maybe some stuff I don't seem to remember.
How about you?
Regards,
Cole
web design companyThis is not the board you are looking at. If you want to ask these questions in this forum go to Breakpoint otherwise go Here. But the last won't suit for you as I don't see "LabVIEW" in such a big list.
The best solution is the one you find it by yourself -
Scripting Languages are for Insane People!!!!
Hope you brought your flamethrowers because I am feeling a bit chilled.
Sooo I am knee deep in some heavy javascript(Nodejs) and while fighting to populate an array with the results of a sqlite query
(somehow my array is getting nuked nodejs or nodejs-sqlite3 bug? )
I am left scratching my head saying to my self WTF!! This would have taken me like 5 sec in Qt C++. So I wrote up the same example
in Ruby, Python, Java, Lua and Perl. And in every case my Qt C++ example was not only cleaner, shorter but easier to write/understand.
Granted scripting languages are not only valuable but necessary in CERTAIN cases, but the way people use them today is just INSANE.
My primary scripting language is javascript but that is only because my work requires it. But ill take lua over any scripting language any day.
I am going to go sink my teeth in Django see if that pisses me off any less!
Sooo whats your opinion.
Last edited by zester (2011-09-13 05:19:18)satanselbow wrote:
ethail wrote:
keenerd wrote:But Lua is a scripting language. Maybe I missed the joke?
I think he could be pointing that of the many scripting languajes he has used, seems that only LUA satisfies him, and it's not widely used as he would like. That's what it seemed to me.
Somewhat ironically (within this threads context) - one of Lua's biggest selling points is it's simple integration with other languages, both scripting and higher level.
Good point!
Lua is insanely <-- Word of the day (Pee-Wee Herman Play House AHHHHHHHHHH) easy
to embed and bind.
Little examples I wrote a couple of years ago sooooo it is what it is.
If using C++
extern "C" {
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
How to call a C Function from Lua
luaavg.c
#include <stdio.h>
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
/* gcc -o luaavg luaavg.c -I/usr/local/include -L/usr/local/lib -llua -lm -ldl */
/* the Lua interpreter */
lua_State* L;
static int average(lua_State *L)
/* get number of arguments */
int n = lua_gettop(L);
double sum = 0;
int i;
/* loop through each argument */
for (i = 1; i <= n; i++)
/* total the arguments */
sum += lua_tonumber(L, i);
/* push the average */
lua_pushnumber(L, sum / n);
/* push the sum */
lua_pushnumber(L, sum);
/* return the number of results */
return 2;
int main ( int argc, char *argv[] )
/* initialize Lua */
L = lua_open();
/* load Lua base libraries */
luaL_openlibs(L);
/* register our function */
lua_register(L, "average", average);
/* run the script */
luaL_dofile(L, "avg.lua");
/* cleanup Lua */
lua_close(L);
/* print */
printf( "Press enter to exit..." );
getchar();
return 0;
-- call a C function
avg, sum = average(10, 20, 30, 40, 50)
print("The average is ", avg)
print("The sum is ", sum)
avg, sum = average(1, 2, 3, 4, 5)
print("The average is ", avg)
print("The sum is ", sum)
--- How to call a Lua Function from C
#include <stdio.h>
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
/* gcc -o luadd luadd.c -I/usr/local/include -L/usr/local/lib -llua -lm -ldl */
/* the Lua interpreter */
lua_State* L;
int luaadd ( int x, int y )
int sum;
/* the function name */
lua_getglobal(L, "add");
/* the first argument */
lua_pushnumber(L, x);
/* the second argument */
lua_pushnumber(L, y);
/* call the function with 2 arguments, return 1 result */
lua_call(L, 2, 1);
/* get the result */
sum = (int)lua_tointeger(L, -1);
lua_pop(L, 1);
return sum;
int main ( int argc, char *argv[] )
int sum;
/* initialize Lua */
L = lua_open();
/* load Lua base libraries */
luaL_openlibs(L);
/* load the script */
luaL_dofile(L, "add.lua");
/* call the add function */
sum = luaadd( 10, 15 );
/* print the result */
printf( "The sum is %d\n", sum );
/* cleanup Lua */
lua_close(L);
/* pause */
printf( "Press enter to exit..." );
getchar();
return 0;
-- add two numbers
function add ( x, y )
return x + y
end
--- How to load and call a lua function from c
//last.cc
# extern "C" {
# #include "lua.h"
# #include "lualib.h"
# #include "lauxlib.h"
int main()
double z;
lua_State *L = lua_open();
luaL_openlibs(L);
if (luaL_loadfile(L, "last.lua") || lua_pcall(L, 0, 0, 0)) {
printf("error: %s", lua_tostring(L, -1));
return -1;
lua_getglobal(L, "f");
if(!lua_isfunction(L,-1))
lua_pop(L,1);
return -1;
lua_pushnumber(L, 21); /* push 1st argument */
lua_pushnumber(L, 31); /* push 2nd argument */
/* do the call (2 arguments, 1 result) */
if (lua_pcall(L, 2, 1, 0) != 0) {
printf("error running function `f': %s\n",lua_tostring(L, -1));
return -1;
/* retrieve result */
if (!lua_isnumber(L, -1)) {
printf("function `f' must return a number\n");
return -1;
z = lua_tonumber(L, -1);
printf("Result: %f\n",z);
lua_pop(L, 1);
lua_close(L);
return 0;
function f (x, y)
return (x^2 * math.sin(y))/(1 - x)
end
---- How to execute a Lua Script from C.
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
/* gcc -o luatest luatest.c -I/usr/local/include -L/usr/local/lib -llua -lm -ldl */
int main()
int s=0;
lua_State *L = lua_open();
// load the libs
luaL_openlibs(L);
//run a Lua scrip here
luaL_dofile(L,"foo.lua");
printf("\nAllright we are back in C.\n");
lua_close(L);
return 0;
io.write("Please enter your name: ")
name = io.read() -- read input from user
print ("Hi " .. name .. ", did you know we are in lua right now?")
---- How to get a Variable value from Lua to C.
#include <stdio.h>
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
#include <string.h>
/* gcc -o test test.c -I/usr/local/include -L/usr/local/lib -llua -lm -ldl */
int main()
lua_State *L = lua_open();
if(luaL_loadfile(L,"settings.lua") || lua_pcall(L,0,0,0))
printf("Error failed to load %s",lua_tostring(L,-1));
else
lua_getglobal(L,"screenWidth");
const int screenWidth = lua_tonumber(L,-1);
printf("Screen Width = %d \n", screenWidth);
lua_getglobal(L,"appName");
const char *appName = luaL_checkstring(L, -1);
printf("Screen Name = %s \n", appName);
lua_close(L);
/* If we got this far, everything worked */
printf("Success!\n");
return 0;
appName = "Firefox"
screenWidth = 400
------ How to write a lua binding in C.
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
#include <string.h>
/* gcc zstring.c -Wall -shared -o zstring.so */
static int zst_strlen(lua_State *L)
size_t len;
len = strlen(lua_tostring(L, 1));
lua_pushnumber(L, len);
return 1;
int luaopen_zstring(lua_State *L)
lua_register(L,"zst_strlen", zst_strlen);
return 0;
require "zstring"
print(zst_strlen("Hello, World"))
----- Another Binding Example
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
#include <unistd.h>
#include <sys/stat.h>
#include <stdlib.h>
/* gcc general.c -Wall -shared -o general.so */
/* system */
static int zst_exec(lua_State *L)
int status;
status = system(lua_tostring(L, 1));
lua_pushnumber(L, status);
return 1;
/* mkdir */
static int zst_mkdir(lua_State *L)
int status;
mode_t mode = lua_tonumber(L, 2);
status = mkdir(lua_tostring(L, 1), mode);
lua_pushnumber(L, status);
return 1;
/* symlink */
static int zst_symlink(lua_State *L)
int status;
const char *old = lua_tostring(L, 1);
const char *new = lua_tostring(L, 2);
status = symlink(old, new);
lua_pushnumber(L, status);
return 1;
/* rmdir */
static int zst_rmdir(lua_State *L)
int status;
status = rmdir(lua_tostring(L, 1));
lua_pushnumber(L, status);
return 1;
/* rename */
static int zst_rename(lua_State *L)
int status;
const char *old = lua_tostring(L, 1);
const char *new = lua_tostring(L, 2);
status = rename(old, new);
lua_pushnumber(L, status);
return 1;
/* remove */
static int zst_remove(lua_State *L)
int status;
const char *filename = lua_tostring(L, 1);
status = remove(filename);
lua_pushnumber(L, status);
return 1;
/* chown */
static int zst_chown(lua_State *L)
int status;
const char *filename = lua_tostring(L, 1);
uid_t owner = lua_tonumber(L, 2);
gid_t group = lua_tonumber(L, 3);
status = chown(filename, owner, group);
lua_pushnumber(L, status);
return 1;
/* chmod */
static int zst_chmod(lua_State *L)
int status;
const char *filename = lua_tostring(L, 1);
mode_t mode = lua_tonumber(L, 2);
status = chmod(filename, mode);
lua_pushnumber(L, status);
return 1;
/* get_current_dir_name */
static int zst_getcwd(lua_State *L)
char *dir;
dir = get_current_dir_name();
lua_pushstring(L, dir);
return 1;
int luaopen_general(lua_State *L)
lua_register(L,"zst_exec", zst_exec);
lua_register(L,"zst_mkdir", zst_mkdir);
lua_register(L,"zst_symlink", zst_symlink);
lua_register(L,"zst_rmdir", zst_rmdir);
lua_register(L,"zst_rename", zst_rename);
lua_register(L,"zst_remove", zst_remove);
lua_register(L,"zst_chown", zst_chown);
lua_register(L,"zst_chmod", zst_chmod);
lua_register(L,"zst_getcwd", zst_getcwd);
return 0;
Ugggg lost all the formating in that.
If you cant make heads or tails of the above you can view it on my google code wiki http://code.google.com/p/zester/wiki/Lua_C
Last edited by zester (2011-09-13 18:20:07) -
Script language for LAN, WAN, wireless?
which scripting language are used for LAN, WAN, wireless to automate things etc? python, shell scripting? is there a tutorial available to i can refer to?
It depends on what you are trying to do.
Shell scripting is quite limited in what it can do when compared to a more general purpose scripting language such as Perl or Python. Nothing wrong with that and I have used shell scripts a lot when I was a Unix admin but for networking most of what I have seen in terms of script languages has been TCL, Perl and Python.
You can use scripts to automate logging on to devices and executing commands, basically the script does what you would type in. To do this you can use Expect and Perl, Python and TCL all have Expect functionality (Expect was originally an extension to TCL).
But you are still just basically automating what you yourself would type and you would run these scripts from a server, PC etc although if you have a lot of devices you need to update with the same details it can save a considerable amount of time and just as importantly if the script works it removes the human error element of configuring multiple devices and perhaps getting a few wrong.
The next step is EEM where the device has an inbuilt TCL interpreter which means you can write applets or scripts that are stored on the device and can respond to specific things happening eg. if an interface goes up or down or the routing table is changed you can execute a set of commands.
There is an EEM forum on here.
I believe also that Nexus switches have an inbuilt Python interpreter which allows pretty much the same thing.
The advantages of the interpreter being on the device is that it saves a lot of extra coding and you can get more information because Cisco have added libraries to those interpreters which are specific to the device and which provide you with a standard set of APIs which your script can use.
As I said scripting can save a lot of time and there is an argument that all network engineers should at least now some scripting and this has become more of a hot topic with the promise of what SDN can achieve in the future although it has to be said there are already configuration management tools out there which make use of the above languages.
It really depends on what you are trying to do and how much you want to automate things.
In terms of tutorials etc. for all the major scripting languages there are a lot of online tutorials and books you can use.
In addition there are sites where you can run your scripts online but to be honest it is easier to simply download the interpreter to your PC, laptop etc. and you should be able to find a compiled version of the interpreter for whatever OS you are running.
Jon -
Hi,
I am an intern at a company which is wanting me to create a scripting language and compiler that would be capable of controlling several instruments on their test bench through GPIB, as well as use the PXI-7833R to communicate to one of their devices over SPI. I would consider myself an intermediate LabVIEW user that has never really worked with any type of VI which involved parsing scripts or the like.
Is there any application other than LabVIEW that would be more suited for this type of application. I plan to have to use several dll's written in C++ to make things easier on myself, but I wasn't sure if I was trying to re-invent the wheel here or if there was something like this that had already been done that I could refer to.
Any help that anyone can give on this subject would be greatly appreciated! Thanks.Thank you all for responding so quickly, all of your help is very appreciated. I will have to go through many of these languages to determine which option is going to be the best suited solution for this. Other than TestStand and Python I really have not heard of any of the others.
I have brought up the idea of using TestStand to the team that is going to be primarily using this application and they have said that many of them have no experience at all with LabVIEW and don't really feel comfortable with the idea of using something like that to do this. They all say that they would feel much more at home with a text based language that they can all pick up on easily. Which, obviously creates more work for me because I have to be able to document all of this so that it is easily to manipulate by others...
I am looking into the LuaVIEW interface right now, I will definitely look into all of the others later and let you all know how things are progressing. If anyone else has any other ideas for ways to make this easier I would greatly greatly appreciate it.
I have one more question which I will really just need once I get the parsing done. As I said in my first post I will be using an FPGA for communicating with a device that will be constantly relaying information back from an A/D. In order to conserve space on the FPGA I am thinking of somehow parsing the code in a way that the commands that only concern the GPIB instruments will be run from the host VI and the code for communcating with the device will be loaded onto the FPGA Target VI. Does this sound like the best way to go about this and do you have any ideas for how to do the separation?
Thank you,
Tyler -
A More Universal Scripting Language Than Applescript or Automator?
I want to learn a scripting language to automate events or actions on a schedule or by using shortcuts, and maybe a little more eventually (like web apps for example). I am looking for something that is not a program with a GUI like Automator, iKey, Quickeys, Maestro... I would rather learn a more "universal" language than Applescript. I've read a little bit about Javascript, Python, Ruby on Rails, PHP, Perl, C+, C++, and others, but I really don't know. I would prefer a language that can be used to program simple things in a simple way, but with a high learning curve. Does anyone have any suggestion(s)? Please let me know if you need any more details. Thanks
Another possibly better forum to ask this would be
https://discussions.apple.com/community/mac_os/mac_os_x_technologies -
Which scripting language?
Hi
I am new to scripting and it all seems very complicated (!).
From a beginners point of view - is there an easier scripting
language to learn and use than others. I seem to get the impression
that php is easy to use than cgi/perl - am I right??>I thought coldfusion was a seperate macromedia
application? wouldn't I have
>to buy a copy??
No. You can use the developer edition (which is free) on your
computer. This would be for developing the web site. But you
do need to have the standard or enterprise edition on your
web
host. What Michael said about CF availability on hosting
servers is true generally - many CF hosts charge more
than Linux/Unix hosting. However there are some good hosts
out there who offer CF at reasonable prices. For example:
http://www.gearhost.com is where
I lease a dedicated server.
Their individual hosting prices which offer ASP, CF and PHP
are very reasonable.
To me, hosting costs are such a small part of a web site's
overall
cost that paying $5.00 or less more a month for the right
solution is
simply not a factor. What it will amount to in the end is
making sure
that the language you choose is suitable to do what your
customer
wants in a very easy and economical fashion.
A less complicated language that becomes faster for you to
code and
faster for users to run should be the ultimate goal IMHO.
Maybe you are looking for
-
Missing Tool, Format and Formula Bars
I am new to Numbers and cannot figure out how to bring up the Tool Bar, the Format bar and the Formula bar also the Sheets pane on a spreadsheet. Is it because I cannot find the "View" button?
-
+ 999 line items invoice posting in MM
Hi, How can you manage +999 line items invoices in MM? Now those invoices are treated in FI, using a program developed that allows the system to split the document in smaller ones, but in the future we want to post them using MM. There is someone who
-
Hello all nokia users, Please give me some advice regarding my problem. HOW CAN I CHANGE the photo resolution for my Nokia E6? All my photos have a 3264 x 1832. Is to much, the photos are to big. Thanks` Best regards!
-
OBIEE - changing imported column datatypes
Hi All, I am trying to join 2 tables in physical layer but the columns on which I am making join condition have different datatypes defined(one is datetime,another is timestamp).Hence, I am getting error incompatible datatypes can't be joined. I don'
-
i am travelling overseas and want to transfer photos from my iPhone to the iPad using iCloud. will this incur data roaming costs?