KiCad 8 Stimulus File Times

Here a stim that works:

* T      p
* i      1
* m          
* e
0us      0s
100us    1s
1.6ms    0s
10.0ms    0s

Now, I change the unit from u to m (2. time line):

* T      p
* i      1
* m          
* e
0us      0s
0.1ms    1s
1.6ms    0s
10.0ms    0s

ERROR **
D_SOURCE: source.in file was not read successfully. 
Instance: a.xu3.a_1   Message:  Time values in first column have to increase monotonically.
Instance: a.xu3.a_1   Message:  dsource will return only its initial state.

I think 100us = 0.1 ms, isn’t it?

I think, d_source ignored the dot.
No fractional numbers allowed?

1.6ms treat as 1 ms.

Works fore me (Linux and Windows).

Is your input file encoding ANSI or UTF-8? Others may not be recognized by KiCad/ngspice.

that works, But the 1.6 ms is treated as 1 ms.
Dot’s are ignored.
The first example don’t works. Because 100us = 1ms.
My file is UTF-8, LF.
Look at hex editor: it’s simple 7-bit ASCII.

Please post the project file here, zipped, including all necessary files, which does show this behavior.

Have created a new simplified project.
Don’t forget to change the “cd” in IMP.lib.


TestStim.zip (20.5 KB)

I have unpacked your example, changed the cd command and run the transient. This is my result, for 100us as well as for 0.1ms (Windows 10, and SUSE Tumbleweed):

What is your operating system? Do you have a locale setting which uses comma as the decimal separator? If yes, could you switch LC_NUMERIC to “C” for testing?

Use the ‘locale’ command and post the response.

switch to en_US:

LANG=en_US.UTF-8
LANGUAGE=en_US
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=en_US.UTF-8
LC_TIME=en_US.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=en_US.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=en_US.UTF-8
LC_NAME=en_US.UTF-8
LC_ADDRESS=en_US.UTF-8
LC_TELEPHONE=en_US.UTF-8
LC_MEASUREMENT=en_US.UTF-8
LC_IDENTIFICATION=en_US.UTF-8
LC_ALL=

it works, pulse ends at 1.6ms


Deutsch:

LANG=de_DE.UTF-8
LANGUAGE=de_DE
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC=de_DE.UTF-8
LC_TIME=de_DE.UTF-8
LC_COLLATE="de_DE.UTF-8"
LC_MONETARY=de_DE.UTF-8
LC_MESSAGES="de_DE.UTF-8"
LC_PAPER=de_DE.UTF-8
LC_NAME=de_DE.UTF-8
LC_ADDRESS=de_DE.UTF-8
LC_TELEPHONE=de_DE.UTF-8
LC_MEASUREMENT=de_DE.UTF-8
LC_IDENTIFICATION=de_DE.UTF-8
LC_ALL=

wrong, pulse ends at 1.0ms
I can’t use ‘,’ aka 1,6ms.
This generates a error in the simulation.


OS/Kicad:

Application: KiCad x86_64 on x86_64
Version: 8.0.1-8.0.1-0~ubuntu20.04.1, release build
Libraries:
    wxWidgets 3.2.1
    FreeType 2.10.1
    HarfBuzz 2.6.4
    FontConfig 2.13.1
    libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3
Platform: Linux Mint 20.3, 64 bit, Little endian, wxGTK, X11, xfce, x11
Build Info:
    Date: Mar 14 2024 15:11:44
    wxWidgets: 3.2.1 (wchar_t,wx containers) GTK+ 3.24
    Boost: 1.71.0
    OCC: 7.6.3
    Curl: 7.68.0
    ngspice: 42
    Compiler: GCC 9.4.0 with C++ ABI 1013
Build settings:

This topic was automatically closed after 90 days. New replies are no longer allowed.