ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Formatting Data using format specifiers

Hi

I am trying to write data into spread sheet file in the following format.

FREQUENCY TR FUN MAG TR FUN PHASE
0.0000e+000 9.4906e-001 0.0000e+000
5.0000e+000 9.4330e-001 3.9650e-001
1.0000e+001 9.4586e-001 2.0495e-001
1.5000e+001 9.4697e-001 8.7126e-002
2.0000e+001 9.4816e-001 7.4445e-003
2.5000e+001 9.4943e-001 -6.5269e-002
3.0000e+001 9.5052e-001 -1.1266e-001
etc,etc.,
I have managed to get the following format using %.4e in the format specifier of the write to spread sheetvi of the programme.
0.0000E+0 1.4573E+1 0.0000E+0
5.0000E+0 1.4573E+1 -4.8455E-2
1.0000E+1 1.4527E+1 -4.0178E-1
1.5000E+1 -3.3379E+0 1.1284E-3
2.0000E+1 -1.9503E+1 9.3193E+1
2.5000E+1 -1.6558E+1 8.0149E+1
3.0000E+1 -1.8624E+1 6.5675E+1
etc.

Can some one tell me how to get the E changed to e and to get 3 digits after E. I have included the programme.

Mal
0 Kudos
Message 1 of 2
(2,797 Views)
Hello malkoba,

I have attached a "quick&dirty" example. You can use it as subvi (after some minor changes).
Probably there is a better/faster solution to your problem.

Btw. have you read Labview Development Guidelines, Chapter 6?

Best regards,
GerdW
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 2
(2,783 Views)