[Scilab-users] extract data in a scope under xcos
Perrichon
perrichon.pierre at wanadoo.fr
Tue Dec 24 16:21:02 CET 2019
Hello Samuel,
In fact, my client want the equivalent of the data in a scilab numerical
scope, but in a format .txt or .csv, as to introduce these files in his
expert analysis software Flexpro.
Since last time, Ive worked around the structure of a scop, and written a
routine hereafter. That a better solution than added a TOWS_c » component
in the xcos diagrams.
I also think that the kind of routines are sorely missing in Xcos in File
menu (gateway to Excel for exemple). It could be an improvment
Sorry for this disturbance
Pierre P.
Best regards
a=gca()
mat=a.children
Legend=mat(1).text'
// Channels titles
nbv=size(Legend); nbv=nbv(2) // Number of
channels
Time=mat(2).data(:,1)
lg=size(Time); lg=lg(1)
// Size of each channel (nb. lines)
NumReg=1
txtNumreg=sprintf("%02i_",NumReg)
filename=txtNumreg + "Francis" + ".txt";
fd = mopen(filename, "w")
// Line 1 : Print Legends
//--------------------------------
mfprintf(fd,"Time")
for i=1:nbv
mfprintf(fd,"\t%s",Legend(i))
end
mfprintf(fd,"\n")
// Data line per line
//-------------------------------------
for i=1:lg
// Print Time
//--------------------
mfprintf(fd,"%0.2f",Time(i))
//Print Data line
//----------------------------------
for k=nbv:-1:1
mfprintf(fd,"\t%f",mat(k+1).data(i,2))
end
mfprintf(fd,"\n")
// Next line
end
mclose(fd)
De : users <users-bounces at lists.scilab.org> De la part de Samuel Gougeon
Envoyé : lundi 23 décembre 2019 11:55
À : users at lists.scilab.org
Objet : Re: [Scilab-users] extract data in a scope under xcos
Hello Pierre,
Le 21/12/2019 à 01:14, Perrichon a écrit :
Dear,
Is there anyway to extract the data in a scope under xcos?
May be because Datatips give every point X,Y
But how to proceed ?
I have added in my scheme a TOWS_c » component ; it works, but the
management is more heavy in the project.
A solution to extract directly in the scope is welcome.
Do you mean to extract some coordinates of curves displayed in a scope, and
then display them as well on the scope?
If so, there is apparently no sink or annotation block to do this.
May be the scifunc_block_m could be hijacked to do the job.
Regards
Samuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20191224/003e9ec7/attachment.htm>
More information about the users
mailing list