LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

wave for editor output on LAB Windows CVI

We are using PXI6711 for generating waveforms. Created the waveforms in Waveform editor and stored as file .I wold like to know how to call these files to generate required wave form in LAB Windows CVI to ouput at at the required channel . Pl find the attachments for the waveforms created using waveformeditor .Requested you to provide the solution
Download All
0 Kudos
Message 1 of 4
(3,453 Views)
When you install the Analog Waveform Editor, you will also get the API for the NI Hierachical Waveform Storage. The function calls for the HWS are used to call the saved waveforms. The help file for this shows how to acquire data using CVI. Here is a part of the help file:

Using NI-HWS in LabWindows/CVI
This topic assumes that you are using the LabWindows/CVI ADE to manage your code development and that you are familiar with the ADE.

"To develop an NI-HWS application in LabWindows/CVI, follow these general steps:

Open an existing or new project file.
Load the NI-HWS function panel (nihws.fp) from \instr by selecting Instrument»Load.
Use the function panel to navigate the function hierarchy and generate function calls with the proper syntax and
variable values. "

Best Regards,
Jeremy R.
NI - Applications Engineer
0 Kudos
Message 2 of 4
(3,453 Views)
Hi Jeremy R,

Thanks for ur Input . As per you suggestion i have modified the code to read the file which is as follows

niHWS_OpenFile ("D:\USB Project\pace500.hws", niHWS_Val_ReadOnly,
&fileHandle);
niHWS_GetWfmReference (fileHandle, "NULL", "NULL", &wfmReference );
niHWS_ReadAnalogI16 (wfmReference, 10000, samples, wave1);
//niHWS_WriteAnalogI16 (wfmReference , 1000, samples);
AO_Configure (1, chanel, 0, 0, 10.0, 0);
memcpy (wave_two, samples, sizeof(samples));
memcpy (wave_two + 50, samples, sizeof(samples));
WFM_Scale (device, 0, 1000, 1.0, wave_two, wave_bin_two);
WFM_Load (device, 1, chan,wave_bin_two, 1000, 0, 0);

WFM_Group_Control (device, 1, 1);

I have created the waveform form waveform editor
with sampling rate 500K/S .Pl find the attachment for the editor wave form . The problem i am facing is not getting any out put . Pl review the code and let me any modification to be done get the required out .

Apriciate ur help

Regards,

Sharanu
0 Kudos
Message 3 of 4
(3,453 Views)
Now I have modified the code by putting the status code . Getting status "o" for opening file but getting negative vlue for get waveform reference . Pl help me with this
istatus=niHWS_OpenFile ("D:\\USBproject\\pace500.hws", niHWS_Val_ReadOnly,&fileHandle);

istatus=niHWS_GetWfmReference (fileHandle, "NULL", "NULL", &wfmReference );

istatus= niHWS_ReadAnalogI16 (wfmReference, 10000, samples, wave1);


Regards,

Sharanu
0 Kudos
Message 4 of 4
(3,453 Views)