Multisim and Ultiboard

cancel
Showing results for 
Search instead for 
Did you mean: 

Importing .txt or .dat file into Multisim as a voltage source for a circuit

Hello,

I having finished designing an ECG amplifier circuit.  I am now faced in trying to determine if my circuit works or not.
In order to do this, we need to feed an ECG signal into the circuit.  I don't believe that Electronic Workbench has an ECG signal generator.
What I heard is that it is possible to import an ECG signal in the form of a text or .dat file that's been measured from a real person.  This text file
can then be imported as a voltage source.  My question is how do we do that?

I've read somewhere that we could use the PWL or PieceWise Linear source, but it does not seem to work.  Also, how do we set the limits
for the ECG so that the EWB can read it i.e., we set a certain threshold like 0.7v etc...

thanks
0 Kudos
Message 1 of 8
(8,790 Views)

The PWL is the only signal source where you can you are able to import data generated by outside of Multisim.  The data to be import must be voltage or current vs Time format.  In Notepad, you can simply have two columns, in the first column and time and the other is voltage.  When you import the data into Multisim, the output signal will look like you have connected the dot.  If you want a square wave, you should have one additional point before the transition.

Tien P.

National Instruments
0 Kudos
Message 2 of 8
(8,764 Views)

Hi, Tien

 

According to your reply, I generate one .txt file and input the data as below and define the PWL reading data from file:

 

 

0 1
0.1 1
0.2 2
0.3 2
0.4 1
0.5 1
0.6 2
0.7 2
But when i run the simulation, no voltage signal is given.
Can you give a template of data file for PWL to read?
Thanks

 

 

0 Kudos
Message 3 of 8
(7,340 Views)

Hi, Tien

 

BTW, if I directly edit the data points in the table rather than reading from file, the PWL works quite okay.

 

Seems the format of data file has some problem.

0 Kudos
Message 4 of 8
(7,339 Views)

Hi Tang Lihua,

 

Can you post the text file you are using so I can take a look?

Garret
Senior Software Developer
National Instruments
Circuit Design Community and Blog

If someone helped you, let them know. Mark as solved or give a kudo. 🙂
0 Kudos
Message 5 of 8
(7,321 Views)

Hi, GarretF

 

I have solved the problem. It is due to the chinese characters in the path. I put the input data file in other place and now the simulation works.

 

Thanks!

0 Kudos
Message 6 of 8
(7,298 Views)

Thanks for letting me know what the problem was. I'll enter issue this into our defect tracker so we can address this in a future release.

Garret
Senior Software Developer
National Instruments
Circuit Design Community and Blog

If someone helped you, let them know. Mark as solved or give a kudo. 🙂
0 Kudos
Message 7 of 8
(7,296 Views)

Hi guys,

Can anyone share with me the .txt file as im having problem to generate the ECG signal to test my circuit. 

Thanks in advance

0 Kudos
Message 8 of 8
(7,179 Views)