Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use IVI-Class generate Pulse

I use agilent 33220A Function Generator,and I want my program will compatible with other Function Generator,So I Use the IVI-Class Driver.Now I want to Generate 1000Hz(Frequency),0-5V,duty cycle 4% Pulse waveform,the attachment is my program,and I want to know why I set Offset greater than zero,it reports error.
0 Kudos
Message 1 of 9
(4,648 Views)
Hello,
  • Do you see the same problem in simulation?
  • What about when using the Specific driver wrapper VI?
  • Does the other FGen report the same error?
  • Can you please provide the error code and message?
  • Have you upgraded to the most recent versions of ICP and VISA?
  • Did you get the IVI specific driver from NI?
Cheers,

NathanT
0 Kudos
Message 2 of 9
(4,642 Views)
Do you see the same problem in simulation?Yes,the error message is the attachment
What about when using the Specific driver wrapper VI?I have tried using the Specific Driver,it report the same error,Please see the attachment
  • Does the other FGen report the same error?sorry I have no other FGen
  • Have you upgraded to the most recent versions of ICP and VISA?Yes,my ICP Version is 2.5 and VISA version is 4.1.0
  • Did you get the IVI specific driver from NI?Yes,I download from ni.com
  • Download All
    0 Kudos
    Message 3 of 9
    (4,640 Views)
    Thanks for answering all of my questions.  The current version of ICP is 3.0 and the current version of VISA is 4.2, but that does not seem to be the issue.  The issue is evidenced by the error code that the driver is generating:

    "Error -1074135016 occurred at hp33120a Configure Arbitrary Waveform.vi
    Possible reason(s):

    Driver Status:  (Hex 0xBFFA0018) Not a valid configuration.

    Secondary Error: (Hex 0xBFFC0005) Parameter 5 out of range, or error occurred while setting Parameter 5.

    Elaboration: The combination of Arbitrary Offset and Arbitrary Gain exceeds the output limits."

    When I reduced the Gain and Offset values, the error did not occur in simulation.  I recommend that you do the same and if necessary find out more about the output limits.

    Cheers,

    NathanT
    0 Kudos
    Message 4 of 9
    (4,602 Views)
    I have reduced the Gain and Offset values,and it indeed not report error,but When I reduced the Gain and Offset values,It can not generate the waveform which I want.
    0 Kudos
    Message 5 of 9
    (4,599 Views)
          I have tried use IVI-Specific Driver to generate the waveform which I want,and it can work correctly,the attachment is my programe,I prefer to use IVI-Class to generate this waveform because the IVI-Class Driver can compatible with other FGen,But it can not generate the waveform which I want.
    0 Kudos
    Message 6 of 9
    (4,597 Views)
    The FGEN class does not support Pulse so if you want to use an instrument specific function, you have to use the instrument specific driver. However, I don't understand why you are playing around with the gain and offset. Why don't you just use the LabVIEW square wave function to generate the signal you want. You set the amplitude to 1 but if you set it to 2.5 and then add the offset to the array, you get the 0 to 5 volt pulse that you want.
    0 Kudos
    Message 7 of 9
    (4,594 Views)
        I have tried the method that you said,but it will report error in IviFGen Create Arbitrary waveform.VI. As I know the IviFGen Create Arbitrary waveform.VI only receive the waveform data which amplitude is 1.It means that it only receive data between -1 to 1.I think this is why we must use the gain and offset to set the pulse amplitude.
    0 Kudos
    Message 8 of 9
    (4,585 Views)
    Sorry, I wasn't aware of the normalization requirement for the IVI driver. I'm confused though about your setting of gain. In the VI you first posted, you have a gain of 5. That will give you an amplitude of 10V. If you want a 5V pulse, your gain should be 2.5 and an offset of 1. Have you tried that?
    0 Kudos
    Message 9 of 9
    (4,571 Views)