PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Adjust Gain in scripting mode using C/C++ API

Hi Guys

 

Does anyone know how I can adjust the gain of an arbitrary waveform when using scripting mode in the C/C++ API?

 

I've found the relevant functions for Arbitrary Sequence mode and Standard Function mode, but not for scripting mode.

 

That is:

 

  • NIFGEN_VAL_OUTPUT_FUNC has functions niFgen_ConfigureStandardWaveform and niFgen_ConfigureAmplitude each taking amplitude as an argument
  • NIFGEN_VAL_OUTPUT_SEQ has niFgen_ConfigureArbSequence which takes gain as an argument
  • NIFGEN_VAL_OUTPUT_SCRIPT has no such function?

 

As far as I can gather its necessary to use niFgen_WriteNamedWaveformF64 in order to refer to that waveform in the script by name, but the function itself has no gain/amplitude argument and it does not return a handle to the function such that I could use niFgen_ConfigureArbWaveform.

 

I can accomplish this in a Labview VI by writing the 'arbitrary waveform - gain' property using the niFGen Property Node, so I assume its must be possible in the C API

 

Any pointers in the right direction would be appreciated.

 

Thanks

Greg

 

0 Kudos
Message 1 of 3
(3,394 Views)

Hi Greg,

 

You could create a dll from your LabVIEW code and call it from you C++ code. Is there any reason why you are not just using LabVIEW?

0 Kudos
Message 2 of 3
(3,391 Views)

Hi Tom

 

I was looking at the possiblility of modifying the script programmatically and thought it might be easier in C, no other reason. I just found it curious that something that can be accomplished in Labview can't (as far as I can tell) be accomplished in C, especially considering I assume Labview just calls the same C functions behind the scenes...

 

Greg

0 Kudos
Message 3 of 3
(3,389 Views)