10-17-2014 11:43 AM - edited 10-17-2014 11:47 AM
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:
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.
10-17-2014 12:22 PM
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/US . With 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:
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):
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
10-17-2014 12:37 PM
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
10-17-2014 01:01 PM
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:
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.
10-17-2014 01:20 PM
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.
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.
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
10-21-2014 11:55 AM
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.
10-21-2014 12:41 PM
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?
Jason