Jump to content
  • 0

Automatic Analog Output Voltage from 0V to 1V with 0.1 V step size Voltage (Change after 10 seconds)


Syed Sibtul Hassan Sherazi

Question

Hi All,

I am using MC USB 202 (8 inputs, 2 Analog outputs with 10kS/s and using Windows 10 Home and have 4.00 GB RAM and a 64-bit operating system, x64-based processor. 

I wanted to change the Analog Output of USB-202 from 0 to 1 Volt with 0.1 V step size (each step changed after 10 seconds). I can do the required thing manually by slider but I wanted it to change automatically by 0.1 V step size.

Could you please tell me about its way? 

Thanks and looking forward to hearing from you.

Link to comment
Share on other sites

15 answers to this question

Recommended Posts

  • 0

I believe that you're referring to how to do it with DAQami. If this is the case, we didn't implement waveform support for the USB-202 because its output is slow. Our DASYLab software can increment the output, but it might be expensive because, at a minimum, the BASIC version is required.

 

Link to comment
Share on other sites

  • 0

Create a data file that contains the waveform and use the Read Data module to send it to the Analog Output. I've attached two worksheets. I created DEFNAME to write the basic file and DEFNAME2 to play it with the Analog Output channel. In between, I used Excel to modify the data file values to be 0.1,0.1,0.1,0.1...0.2,0.2,0.2,0.2, etc. If you need more control over the waveform, you may need to upgrade from BASIC to FULL.

DEFNAME.DSB DEFNAME2.DSB DEFWRITE.TXT

Link to comment
Share on other sites

  • 0

Thanks! Do you mean that I should form the write file by the generator and then read it while analog output?  I did that please check the attached files. 

By the way, why did you use Excel? Do you want to have 0.1 several times and the same goes for 0.2 etc? I just put the same settings as yours and I have been getting the values in the file. Please tell me the reason for using Excel.

Why do you use the sawtooth waveform as it will have to go downwards after time T? Can we do the same experiment for 0 to 5 Volts in 5 minutes? Please tell me the way or make the changes in the attached files. I shall be highly obliged. 

Moreover, can I control the above-mentioned waveform using the LITE Version? If not then what are its limitations? And what are the advantages of FULL as compared to BASIC and what is the price difference? How much can we control the waveform using the BASIC Version? 

Thanks and looking forward to hearing from you.    

1a.DSB 2a.DSB

Link to comment
Share on other sites

  • 0

I used a sawtooth wave to make a file. Then, I used Excel (or Notepad) to modify the time and data channels to start at 0.00 volts and end at 1.00 volts. When the file is read back, the output will begin at 0.00 volts and stop at 1.00 volts. If you want to run for 5 minutes, edit the file to extend the time and data. It's tedious, but it works. DASYLab FULL provides the Action module, which can reset the file if you want to play it again.

Edit the 1a.dsb file so that the sawtooth ramp stops at the maximum, which is the last value to be read by the Read Data module (stop at EOF).  Change the Analog Output module in 2a.dsb to use the DASYLab time base. Click the Measurement button on its setup panel to do this. 

Link to comment
Share on other sites

  • 0
6 hours ago, JRys said:

Measurement

Hi,

How to edit the file 1a.dsb file. I saw the setting of the generator but did not find the option to stop at EOF. By the way, what do you mean by EOF? 

Moreover, in the 2a.dsb file, the time base is DASYLab time base which is attached. 

I can use the LITE version for this task as well. 

Thanks and looking forward to hearing from you. 

Link to comment
Share on other sites

  • 0

I have opened the settings of the wave generator and read the file respectively. There is an option for the size of the block in the read file settings. What will be its effect if I change it from 1?  

Moreover, in the created file (After running) there is a Delta which is 0.1 in my case. Could you please tell me from where and how to change it? 

In addition to it, there are frequency and amplitude in the wave generator settings. How does frequency impact if we change it as at the moment it is 1e^-02 and why have we chosen it? The amplitude is 1 as we wanted to have a maximum value of 1. If we want to have a maximum 5 amplitude, we can change it by 5. 

Lastly, how can we implement the complete sawtooth waveform from 0 to 1 and then from 1 to 0 in 2 minutes? 

Basically, I have been trying to understand the files completely from the core so that I can use it more swiftly for the coming tasks. 

It will be great if you reply to it. I shall be highly obliged to you. 

Edited by Syed Sibtul Hassan Sherazi
Incomplete earlier
Link to comment
Share on other sites

  • 0

Block size is used when you have DASYLab modules that require a block of samples instead of a single value. For example, the Y/t Chart must receive a block of samples, whereas the Chart Record does not.

The Delta value is the time between each sample. It is set by the Generator frequency when the file is created. A frequency of 0.01 Hz will generate 1000 samples per waveform cycle with a time base setting of 10 Hz. The cycle time for the sawtooth ramp is 1 / 0.01 or 100 seconds. Divide this by the time base time and you get 100 / 1/10 = 100 * 10  = 1000 samples. The sawtooth was chosen because it is a ramp, per your requirements. If you want a maximum of 5, change the amplitude to 5. 

The Read Data module can be used with its default settings. You don't need to specify a block size. 

To generate a 2-minute file, use 1 / 120, which is 0.008333 for the frequency. Stop the worksheet when you see the ramp drop back down to zero. After, use Excel to delete the time-sample rows after the ramp has reached the maximum voltage. 

 

Link to comment
Share on other sites

  • 0

Basically, I wanted to record/draw the IV Curve of the resistance (1 Kilo Ohm placed on the physical breadboard) via the Chart recorder or XY Graph of USB 202 DAQ with DASYLab 2022.

The input to one end of the resistor is the Analog Output (0 Volt to 1 Volt in 1 minute with 0.1 V step size) and the other end is grounded.

image.png.c06fcb626cddc582c08f00c7f14380ac.png

Now the question is how I can measure the current through resistance. And after measuring the current, how can I draw the IV Curve? I am confused as the Analog input of USB 202 DAQ takes voltage as input, not as current.

May I request to please assist me in this regard and tell me how I can do this?

Thanks.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...