Signal Generators

cancel
Showing results for 
Search instead for 
Did you mean: 

help creating custom waveform using Analog Waveform Editor

I'm trying to create a two custom waveforms that will be used as an external signal to control two seperate hydraulic actuators. The waveforms will be identical but offset of eachother. When one is applying load and releasing the other will be outputting zero, alternating back and forth indefinitely. The Y-axis is voltage since the actuator controllers expect +/-10v signals. X-axis could be time although I'm not sure from a control standpoint if that would be too combursome of a file. I would like it to be more iterative.

I would like the waveforms to look like this but obviously repeat:

Capture.JPG

 

 

 

is this something that can be done in the Analog Waveform Editor? I dont have much for LabVIEW skills since I mostly use Signal Express as our main data logging software.

SCXI- 1000 Chassis w/ 1346 adapter
PCI 6281 DAQ card
SCXI- 1520 Bridge Board w/ 1314 Terminal Block (x2)
SCXI- 1180 Feedthrough Panel w/ 1302 Block
Signal Express 2014.
Win7 Enterprise
0 Kudos
Message 1 of 7
(7,832 Views)

If you don't have AWE, you don't necessarily need it for this. I recommend demoing it before you buy it here: http://www.ni.com/gate/gb/GB_EVALANLWAVEDTR/USWith AWE you are just generating the data that needs to be downloaded onto the device. You still need to use LabVIEW to read the file and write it to your device. If you already have the data stored somewhere, it looks like you do in Excel, you can use LabVIEW to read from spreadsheet and download the data onto your device. This means that you might not need AWE.

 

Anyway, here is what you need to do to make this with AWE:

  1. Open AWE
  2. Select Blank Waveform
  3. Choose the Sample Rate that you are going to need. I'm not going to work the math out for you. For this example I'm going to use 100kS/s. Device Type I'm going to select DAQ. Hit OK
  4. On the top bar, hit the Add Component... Button.
  5. It defaults to sine. I'm assuming that what you have here is the first 180 degrees of a sine wave and then zero volts. It could obviously not be exactly a sine wave, but I am assuming it is. The default # of samples is 1000. Once again, you should do the math so you know what you need here. With the # of samples at 1000 and Sample Rate is 100kS/s,  the frequency needs to be 50 to get the first part of the sine wave.
    first.PNG

  6. Click OK. This adds the first part of your signal.
  7. Click on Add Component... again.
  8. Change the primitive to DC.
  9. Change the voltage level to 0. Change the number of samples so you get the length that you want. Since my previous component was 1000, I am keeping mine at 1000.
    second.PNG
  10. Click OK and this is what you get. 
    third.PNG

  11. You then export your waveform to LabVIEW by saving it as a file and opening it in LabVIEW. 

Looking at your HW, I think you have a DAQ Card. DAQ Assistant is the most similar thing to use when you come from Signal Express. It basically calls your DAQ function calls for you like Signal Express. It may be good for starting out but you should definitely spend some time to learn how to program with DAQ. Start from the Examples (LabVIEW -> Help -> Find Examples. In Example Finder, Hardware Input and Output -> DAQmx -> Analog Output ->  Voltage Continuous Output. You will find with practice and understanding that this is way more powerful than SE and DAQ Assistant.

 

You edit this portion of the code, instead of using Basic Function Generator to generate a waveform on your devices memory, you pull it from your file (from AWE or Excel):  

fourth.PNG

I your waveform should loop continuously with this example code. If you need help with this portion, you should ask on the dedicated DAQ forum. This board is more for NI Signal Generators (NI 54xx series devices) and AWE.  The DAQ discussion board can be found here: http://forums.ni.com/t5/Multifunction-DAQ/bd-p/250

 

Jason

Product Support Engineer
National Instruments
0 Kudos
Message 2 of 7
(7,827 Views)

I'm not too familiar with SE, but just from looking really quickly, I think you can import ASCII, LVM, SPICE, and HWS files for your analog waveform generation. If you have the data in excel, load it from ASCII. AWE can save it as LVM, HWS, ASCII or .bin (binary).

 

Jason

Product Support Engineer
National Instruments
0 Kudos
Message 3 of 7
(7,822 Views)

Thank you for your help.
I'm really fumbling in the dark here so bare with me.

I did DL the AWE trial and i'm still wrapping my head around the different functions and how they relate to the waveform. I was able to create a haversine period with a dc primative attached. I did this for two channels. Exported them both to LVM and pulled them into SE.

So far it looks like this:

Capture3.JPG

 

However I'm having trouble generating a continuous/repeating signal and the frequency and sample size is off.
I'd like one cycle (including the DC portion) to only last 2 seconds.

Again, fumbling in the dark with new tools here so excuse my noobness. Honestly I'm at the stage where I'm trying to even ask the right questions.

SCXI- 1000 Chassis w/ 1346 adapter
PCI 6281 DAQ card
SCXI- 1520 Bridge Board w/ 1314 Terminal Block (x2)
SCXI- 1180 Feedthrough Panel w/ 1302 Block
Signal Express 2014.
Win7 Enterprise
0 Kudos
Message 4 of 7
(7,818 Views)

If you don't want to do the math, all you need to do is determine what your sample rate should be. In AWE, when you create a waveform it asks for a sample rate. 

 

1.PNG

 

Then when you add your components, you can choose how long you want each component to be. AWE works the math out for you based on the sample rate you chose.

 

2.PNG

 

Each component should be 1 second so when you add both components together, its 2seconds.

Instead of adding in steps to read the file, you can Add a Step for Voltage Output (Add Step -> Generate Signal -> Analog Output -> Voltage) It should ask you where you want to generate from and you have the option of loading it from the file. This pulls the data from file and links it with your generation task. Under Timing Settings you should select Continuous for Generation Mode and select the appropriate Samples to Write.

 

Jason

Product Support Engineer
National Instruments
0 Kudos
Message 5 of 7
(7,813 Views)

Any idea why I'm getting this error?
Error-201435 "No samples provided to DAQmx Write to initialize buffered generation"

Seaches on that error # do not come back with the same description as what I'm getting.

Capture.JPG

SCXI- 1000 Chassis w/ 1346 adapter
PCI 6281 DAQ card
SCXI- 1520 Bridge Board w/ 1314 Terminal Block (x2)
SCXI- 1180 Feedthrough Panel w/ 1302 Block
Signal Express 2014.
Win7 Enterprise
0 Kudos
Message 6 of 7
(7,771 Views)

Hi Odin,

 

If this doesn't work then you should post in the Signal Express forum. I think I know what is wrong though. Click on the triangle next to your sig1.lvm and select the waveform. I think right now Signal Express defaults to selecting the .lvm file and not the data inside? 

 

waveform.PNG

 

Jason

Product Support Engineer
National Instruments
0 Kudos
Message 7 of 7
(7,767 Views)