OCEAN print problem

S

Stephen

Guest
Hey all,

After my circuit has simulated in OCEAN, I am using the following code
to obtain results in a file (there may be easier ways to do this, but
bear with me here):

==================================================

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Calculate w ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

freq=frequency( v( "/V1" ) )

w=2*3.141592654*freq

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Create a list of when the peaks of the sine wave occur in time ;
; Output this list to a file
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

biglist=root( deriv( v( "/V1" ) ) /w )

myport=outfile("/egr/research/RFIC/zielstep/V1data")

print( biglist myport)

==================================================

The code works like a charm except when I go to gather the data. Most
of it is missing! It completes for the first 2.6us (roughly) in the
transcient analysis, then after that it does not give the remaining
7.4us of data.

Size should not be an issue, as it only take up 120K. Is this amount
set in stone though? A nice round 120K does seem suspicious, but I
can't find anything on that.

If any of you OCEAN gurus out there can lend me a hand, I would
appreciate it very much. Even a hint would be very helpful. Thank in
advance for your time.
 
I would try

biglist=root( deriv( v( "/V1" ) ) /w )

myport=outfile("/egr/research/RFIC/zielstep/V1data")

foreach( element biglist
fprintf( myport "%L\n" element )
)

close( myport )
 
I'm going to try that in an hour or so, once I get back to the lab.

I don't know if it helps this problem or anything, but I tried printf
instead of print and after a small delay (and with a much smaller set
of numbers) it worked. But using print only gave me roughly a third of
the numbers again - strange.

I will let you know if that works soon, thanks!


Bernd Fischer wrote:
I would try

biglist=root( deriv( v( "/V1" ) ) /w )

myport=outfile("/egr/research/RFIC/zielstep/V1data")

foreach( element biglist
fprintf( myport "%L\n" element )
)

close( myport )
 
What I tried to explain here, I mean should be clear.
I run a foreach loop over all collected elements in the biglist,
printing every element in the list.
Finally I close the out port, to make sure all data will be flushed to the file.

Bernd

Stephen wrote:
I'm going to try that in an hour or so, once I get back to the lab.

I don't know if it helps this problem or anything, but I tried printf
instead of print and after a small delay (and with a much smaller set
of numbers) it worked. But using print only gave me roughly a third of
the numbers again - strange.

I will let you know if that works soon, thanks!


Bernd Fischer wrote:
I would try

biglist=root( deriv( v( "/V1" ) ) /w )

myport=outfile("/egr/research/RFIC/zielstep/V1data")

foreach( element biglist
fprintf( myport "%L\n" element )
)

close( myport )
 
Genius! Not only did that work, but it formatted everything exactly
the way I wanted it! Thank you very much!

Bernd Fischer wrote:
What I tried to explain here, I mean should be clear.
I run a foreach loop over all collected elements in the biglist,
printing every element in the list.
Finally I close the out port, to make sure all data will be flushed to the file.

Bernd

Stephen wrote:
I'm going to try that in an hour or so, once I get back to the lab.

I don't know if it helps this problem or anything, but I tried printf
instead of print and after a small delay (and with a much smaller set
of numbers) it worked. But using print only gave me roughly a third of
the numbers again - strange.

I will let you know if that works soon, thanks!


Bernd Fischer wrote:
I would try

biglist=root( deriv( v( "/V1" ) ) /w )

myport=outfile("/egr/research/RFIC/zielstep/V1data")

foreach( element biglist
fprintf( myport "%L\n" element )
)

close( myport )
 

Welcome to EDABoard.com

Sponsor

Back
Top