Sending .arb files to function generator

Hi
 i am  very  fresh to labview  programming.
 I have  created some  waveforms  using  HP BenchLink software(and saved in .arb file  format).  Can i send  these  wave forms  to  a  function generater  through Labview  program . if  possible   how  can i do that
Thanks
jith

Hi
 Yes  i have  downloaded the driver ag3xxx and  installed .  and   also got  some  advise from [email protected]
  Their  comments  follows .
                Yes you can read the values from the .arb file into LabVIEW and store
the values in 1D array or text file and then send it to the function
generator you are using.
     Basically you would have to use APIs such as read from binary
file(there are examples present in LABVIEW example finder which shows an
example of how you could read a binary file.) After reading from the file
you could store its values in an array or a text file and the read from
this array and send the data to the function generator you are using. If
you are using a function generator which is not made by National
instruments you have to install the device drivers for that instrument fro
LABVIEW, you could install them from www.ni.com/idnet.
             i have  used  some  eg:  programmes   given in LV to read binary files .
             The  function name is  "read binary files vi " .  the  out  put  of "read binary files vi "
             is  data .  I am trying  to store this  data  in an array  , but   got  stucked  ,  in finding
             a sutable  function to send  this  array valuse  to  the  function generator. Can  i send
              the  array out  put  directly to a  FG  ?
 Thanks
 jith

Similar Messages

  • Send data using exel file to function generator

    Hi all,
    I have one function generator which I controll with LabVIEW, I attached here the simple code.
    I would like that code read some data from exel file .
    May you please help me?
    Thanks
    Attachments:
    DG4000General.vi ‏43 KB

    I used different example like the one that I attached but I can not connect with m device.
    Now I can read my datas from Exel but how can I send to generator?
    I really confused.
    thanks in advance
    Attachments:
    Untitled 1.vi ‏34 KB

  • Send a file to the printer!

    Hello,
    is it possible to send a file, that is generated with the
    printer-driver, to a network-printer? This should be done with LabVIEW
    6i
    Jens

    [email protected] (VI Guy) wrote in <5065000000050000007CAB0000-1031838699000
    @exchange.ni.com>:
    >Yes and no.
    >
    >The printer has to be of the type that allows this (I don't know the
    >exact requirement but some printers allow it and others don't).
    >
    >Set up your computer so the network printer is "mapped" to printer
    >port like "LPT1" or "LPT2" (If I recall this requires you to answer
    >yes to the "Do you print from MS-DOS applications?" during the "Add a
    >Printer" wizard).
    >
    >Then, you will need to use the "Shell Exec.vi" and do a "COPY /B
    >Filename.bin LPT1", given that "Filename.bin" is the file you created
    >with the print driver and "LPT1" is the port you mapped your printer
    >to.
    >
    Alternatively if it's just a plain old text printer, you can use the serial
    vi's
    to send the text directly to a line printer using COM10. Note that you
    will have to include a line in your labview.ini file (and in the ini file
    with your built application) that allows you to access com10. The line is
    something like:
    "serialDevices=com1;com2;com3"
    but a search on using the line printer on the NI website will reveal the
    correct key and entry.
    Alexander C. Le Dain, PhD
    ICON Technologies Pty Ltd
    http://www.icon-tech.com.au
    * The LabVIEW FAQ http://www.icon-tech.com.au/thelabviewfaq.html *

  • Sending waveform to function generator?

    Hello all,
    I am using an agilent 33205A function generator and require it to use a
    special driving waveform.  Currently I load the waveform using
    this HP Benchlink software.  I would like to automate this in the
    startup of my vi.  Is there a way to download a "home-grown"
    waveform to the function generator using labview? 
    Thanks,
    Azazal
    Azazel
    Pentium 4, 3.6GHz, 2 GB Ram, Labview 8.5, Windows XP, PXI-5122, PCI-6259, PCI-6115

    If you're using the driver from here, then use the function called ag33xxx - Arbitrary Wfm Ops. You will have to create the waveform in the form of a 1D array. Look at the high level example called ag33xxx - Arb - Application. I don't see a function in the driver that allows you to output a defined waveform so you may want to look in the instrument manual to see if there is such a function. If there is, then it should be a simple matter to read it and then place the values into LabVIEW as a constant or something you read from file.

  • How to read data from a GPIB when sending a function generator command

    I'm using Visual C++ with the ComponentWork ActiveX and I'm tring to plot a
    CWGraph using the data coming from a GPIB device. When I write command such
    as "*IDN?" to the GPIB device, everythings if fine and I can read what the
    GPIB device return me. But when I send a command like "SOUR:FUNC SIN;SENS
    DATA?", the writing seems to be okay, but when I try to read the data, I
    alway get a "Timeout expired before operation completed" error message. I
    have tried with the CWGPIB and with the CWVISA but the result are the same
    with both.
    My reading code looks like this:
    COleVariant vReadBuffer;
    vReadBuffer = m_VISA.Read( COleVariant( (short) 2000 ) );
    and it work fi
    ne for "*IDN?" or for multimeters command.
    I want to know how I must read the data for function generator commands.
    Thank alot

    It sounds like your device is not accepting that command string as valid. The string you listed above is probably missing a colon between SENS and DATA. "SOUR:FUNC SIN;SENSATA" Try sending this string in Measurement & Automation Explorer to the instrument first to make sure it is working.
    Best Regards,
    Chris Matthews
    Measurement Studio Support Manager

  • Sending XML file from SAP to Windows Based file server with FTP function

    Hi Gurus,
    We are using SAP BW 3.0B version.
    I need to convert data in ODS to XML format and send this XML file to remote server which  is not a SAP application server, it is just a Window Based file server with FTP function..
    By writing some ABAP code I have converted ODS data into XML format (which gets saved in my local system)
    (Is that I need to put this file in Application Server to send it to the other servers? )
    Now the thing is how I can send this file to that Windows Based file server.
    plz suggest me.... what can be done......
    Thanks in Advance
    Madhusudhan
    Edited by: Madhusudhan Raju on Dec 3, 2009 4:25 AM

    I dont think the above code support windows OS. Because I always execute this script via UNIX.
    I think you can try this option, go to command prompt, goto the destination path where you have an XML file using cd....
    ftp (destination servername), specify the username and password.
    afterthat, use the command put and filename.
    check whether the file had reached destination successfully or not.
    For automation purpose, you can use the following script like
    ftp: -s: test.txt  (servername)
    In test.txt,
    UserName
    Password
    bin
    cd /files
    put file.xml
    bye
    Also, you can check in SM69, there will be some SAP external commands to automate the file transfer.
    Thanks
    Sat
    http://support.microsoft.com/?kbid=96269

  • Trying to get Photoshop CS4 functional with Mavericks and an Epson 3880 printer. CS4 fails to send a file to the print queue. Have reinstalled the Epson 3880 driver for Mavericks. All looks good but no file is sent.

    rying to get Photoshop CS4 functional with Mavericks and an Epson 3880 printer. CS4 fails to send a file to the print queue. Have reinstalled the Epson 3880 driver for Mavericks. All looks good but no file is sent.
    Does anyone know how to fix this?

    What EXACT version of Photoshop CS4 are you running?  You should be on Photoshop CS4 v 11.0.2.
    Also run Apple's software update to see whether it offers you the latest Epson update:
    Printer Driver v9.33
    Epson Stylus Pro 3880, Drivers & Downloads - Technical Support - Epson America, Inc.
    MOST IMPORTANTLY:  have Photoshop re-create its own Preferences:
    To re-create the preferences files for Photoshop, start the application while holding down Ctrl+Alt+Shift (Windows) or Command+Option+Shift (Mac OS). Then, click Yes to the message, "Delete the Adobe Photoshop Settings file?"
    Note: If this process doesn't work for you while you're using a wireless (Bluetooth) keyboard, attach a wired keyboard and retry.
    Important: If you re-create the preferences by manually deleting the Adobe Photoshop CS6 Settings file, make sure that you only delete that file. If you delete the entire settings folder, you also delete any unsaved actions or presets.
    Reinstalling Photoshop does not remove the preferences file. Before reinstalling Photoshop, re-create your preferences.
    NEW Video! Julieanne Kost created a video that takes you through two ways of resetting your Photoshop preferences. The manual preference file removal method is between 0:00 - 5:05. The keyboard shortcut method is between 5:05 - 8:18. The video is located here:
    How to Reset Photoshop CS6’s Preferences File | The Complete Picture with Julieanne Kost | Adobe TV
    Mac OS
    Important: Apple made the user library folder hidden by default with the release of Mac OS X 10.7. If  you require access to files in the hidden library folder to perform Adobe-related troubleshooting, see How to access hidden user library files.

  • Labview 6 arbitrary function generator file format?

    Hi,
    I have old hardware (e.g. DAQcard1200) which I have to use with old versions of Labview (4 or 6) (as they run on "old" hardware - Pentium1 embedded boards with Win98 etc.). With Labview 8 I can load a file in .lvm format and use it as output for A0. But how is this with the "arbitrary function generator" from Labview 6 (benchtop.llb)? I constructed an arbitrary function manually within the vi and saved it to a file, but its format does not make sense - only "strange" characters are displayed, like dŸ¾ “£¾ˆt÷¾ VJ¾– ¾ ñ¾£úD¾ªÛ˜¾±¼ë¾¸ž, if I open the file with an editor...  
    Thanks!!
    ;-) Torsten

    I don't have LabVIEW 6.1, but if the example hasn't changed, then that example writes out a binary file, which is why you get all those "strange" characters. The file should be an array of SGL values. Thus, you can read it into LabVIEW using the Read From Binary File, and wiring an SGL constant to the "data type" input.
    Attachments:
    Example_VI_BD6.png ‏1 KB

  • I want to use the Function Generator VI to send command signals through the NI 7344 motion controller. This will be a closed loop servo valve system. I want to be able to change from say a square wave to a sine wave on the fly. Idea's?

    I am going to run tests that require an actuator to move using various types of arbitrary waveforms such as sine or square. The NI 7344 is hooked to the UMI that is going through a driver for a servo valve. The loop is analog and it is closed. I have played with some of the examples but can't get it to work. I have used the function generator VI to generate a signal but I think I am using the wrong input VI to the motion control board. When I use what I have it moves the servo and then stops. It doesn't continually generate the signal.
    I would love to use the controls on the function generator vi to control frequency and amplitude ect. Any help or pointer would be helpful. Thank you in advance.

    Hello,
    I'm not clear on exactly how you want to use the generated data but I'm assuming they will be used as your target points.
    There's a built-in example for motion called 'One-Axis Contour Move.vi'. This example demonstrates how to provide your target points as 1-D array. All you need to do is to replace the input array with the output of the function generator. In order to have it run continuously, use a while loop. You can further program your application so that it'll change the waveform on the fly by monitoring the user interface but this might be little little tricky as you will need to reset the move and load the new generated points while keeping track of your current position.
    I hope this helps. Let me know if you have further questions regarding this
    application.
    Best regards,
    Yusuf C.
    Applications Engineering
    National Instruments

  • How to Sender PDF file as attachment in Payload?

    Hi Experts,
         After I done some of PI scenarios, I'm stuck with one of my requirement... In requirement, "Web service" will send request to "SAP ECC 6" in order to get PO document print out in PDF file by call smartform or any form printing as usual.
         In my understand, I'm using SOAP adapter as sender and RFC adapter in receiver side, in  RFC function, I will call form and generate PDF file by using normal ABAP function, but here, how can I send PDF file as response message of SYNC call from web service.
         I try to search and read some of document and blog, some said I can attach file as Payload attachment, but no clear solution or guide to do so.
        Here is example blog that I found, I really useful
           /people/michal.krawczyk2/blog/2006/04/19/xi-rfc-or-abap-proxy-abap-proxies-with-attachments
        Please suggest me in my case,
    Thanks in advance...
    Cheers,
    Terry

    Hi,
    >>In my understand, I'm using SOAP adapter as sender and RFC adapter in receiver side, in RFC function, I will call form and generate PDF file by using normal ABAP function, but here, how can I send PDF file as response message of SYNC call from web service.
    as per my blog you can attach PDF to a message only if you use abap proxy on ECC and not RFC
    the code is just copy and paste from my blog:
    /people/michal.krawczyk2/blog/2006/04/19/xi-rfc-or-abap-proxy-abap-proxies-with-attachments
    so there is nothing spectacular there
    Regards,
    Michal Krawczyk

  • Smartform sending pdf file as a mail

    i have done a mailing a pdf as mail i am able to down load a file in to the systam which is perfect but i am not able to send the mail can any one tell me whats the problem in this and guide me if there is any problem.
    CALL FUNCTION 'GUI_FILE_SAVE_DIALOG'
    EXPORTING
       WINDOW_TITLE            = 'Save as'
       DEFAULT_EXTENSION       = 'PDF'
       DEFAULT_FILE_NAME       = W_FNAME
      WITH_ENCODING           =
      FILE_FILTER             =
      INITIAL_DIRECTORY       =
      DEFAULT_ENCODING        =
    IMPORTING
       FILENAME                = W_FNAME
      PATH                    =
      FULLPATH                =
       USER_ACTION             = v_action
      FILE_ENCODING           =
    if v_action = '9'.
      exit.
    endif.
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    BIN_FILESIZE = W_BIN_SIZE
    FILENAME = W_FNAME
    FILETYPE = 'BIN' "'ASC'
    IMPORTING
    FILELENGTH = V_FILESIZE
    TABLES
    DATA_TAB = T_PDF_TAB
    EXCEPTIONS
    FILE_WRITE_ERROR = 1
    NO_BATCH = 2
    GUI_REFUSE_FILETRANSFER = 3
    INVALID_TYPE = 4
    NO_AUTHORITY = 5
    UNKNOWN_ERROR = 6
    HEADER_NOT_ALLOWED = 7
    SEPARATOR_NOT_ALLOWED = 8
    FILESIZE_NOT_ALLOWED = 9
    HEADER_TOO_LONG = 10
    DP_ERROR_CREATE = 11
    DP_ERROR_SEND = 12
    DP_ERROR_WRITE = 13
    UNKNOWN_DP_ERROR = 14
    ACCESS_DENIED = 15
    DP_OUT_OF_MEMORY = 16
    DISK_FULL = 17
    DP_TIMEOUT = 18
    FILE_NOT_FOUND = 19
    DATAPROVIDER_EXCEPTION = 20
    CONTROL_FLUSH_ERROR = 21
    OTHERS = 22 .
    IF SY-SUBRC <> 0.
    MESSAGE 'File not downloaded succesfully' TYPE 'E'.
    ELSE.
    CONCATENATE 'File : ' W_FNAME 'downloaded succesfully ' INTO MSG1.
    MESSAGE MSG1 TYPE 'I'.
    ENDIF.
    data : GD_DOC_DATA type SODOCCHGI1.
    data : LT_MAILPACK type standard table of SOPCKLSTI1.
    data : LA_MAILPACK type SOPCKLSTI1.
    data : LT_OBJTXT   type STANDARD TABLE OF SOMLRECI1 WITH HEADER LINE.
    DATA:LF_LINES TYPE I.
    DATA LV_OUTPUT TYPE SDOKCNTBINS WITH HEADER LINE.
    *DATA LV_OUTPUT TYPE standard table of SOLISTI1 .
    data pdf_file type XSTRING.
    DATA: IT_RECEIVERS TYPE STANDARD TABLE OF SOMLRECI1 WITH HEADER
    LINE.
    data iv_mailid type AD_SMTPADR.
    move W_FNAME to pdf_file.
    Data : w_buffer TYPE string.
    *data : i_record LIKE solisti1 OCCURS 0
    *WITH HEADER LINE.
    data : i_record LIKE solisti1 OCCURS 0
    WITH HEADER LINE.
    data : s_record LIKE solisti1 OCCURS 0
    WITH HEADER LINE.
         CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
           EXPORTING
             BUFFER     = pdf_file "PDF file from function module
           TABLES
             BINARY_TAB = LV_OUTPUT.
         DESCRIBE TABLE LV_OUTPUT LINES LF_LINES.
    loop at T_PDF_TAB.
    *TRANSLATE T_PDF_TAB USING '~'.
    CONCATENATE w_buffer T_PDF_TAB INTO w_buffer.
      endloop.
    *TRANSLATE w_buffer USING '~ '.
    DO.
    i_record = w_buffer.
    APPEND i_record.
    SHIFT w_buffer LEFT BY 255 PLACES.
    IF w_buffer IS INITIAL.
    EXIT.
    ENDIF.
    ENDDO.
    s_record[] = i_record[].
    *DESCRIBE TABLE T_PDF_TAB LINES LF_LINES.
    select single SMTP_ADDR from ADR6 into iv_mailid where ADDRNUMBER =
    IV_ADDNR_VENDOR.
         DATA:LT_OBJTXT LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
          MOVE 'Email sent to you from SAP' TO LT_OBJTXT.
          APPEND LT_OBJTXT.
          GD_DOC_DATA-OBJ_DESCR = 'PDF'.
          GD_DOC_DATA-OBJ_NAME  = 'PDFMail'.
          GD_DOC_DATA-OBJ_DESCR = 'PDF'.
          GD_DOC_DATA-SENSITIVTY = 'O'.
       GD_DOC_DATA-EXPIRY_DAT = SY-DATUM + 15.
          GD_DOC_DATA-DOC_SIZE = STRLEN( LT_OBJTXT ).
          CLEAR  LA_MAILPACK.
          LA_MAILPACK-HEAD_START = 1.
          LA_MAILPACK-HEAD_NUM = 0.
          LA_MAILPACK-BODY_START = 1.
          LA_MAILPACK-BODY_NUM = 1.
       LA_MAILPACK-DOC_TYPE = 'RAW'.
          LA_MAILPACK-DOC_SIZE = STRLEN( LT_OBJTXT ).
          APPEND  LA_MAILPACK TO  LT_MAILPACK.
          CLEAR LA_MAILPACK.
          LA_MAILPACK-TRANSF_BIN = ''.
          LA_MAILPACK-HEAD_START = 1.
          LA_MAILPACK-HEAD_NUM = 1.
          LA_MAILPACK-BODY_START = 1.
          LA_MAILPACK-DOC_TYPE = 'PDF'.
          LA_MAILPACK-BODY_NUM = LF_LINES.
          LA_MAILPACK-DOC_SIZE = LF_LINES * 255.
          LA_MAILPACK-OBJ_DESCR = 'Open'.
          LA_MAILPACK-OBJ_NAME = 'MAIL'.
          APPEND LA_MAILPACK TO LT_MAILPACK.
          IT_RECEIVERS-RECEIVER = iv_mailid.
          IT_RECEIVERS-REC_TYPE = 'U'.
          APPEND IT_RECEIVERS.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
      EXPORTING
        DOCUMENT_DATA                    = GD_DOC_DATA
       PUT_IN_OUTBOX                    = 'X'
       COMMIT_WORK                      = 'X'
    IMPORTING
      SENT_TO_ALL                      =
      NEW_OBJECT_ID                    =
      TABLES
        PACKING_LIST                     = LT_MAILPACK
      OBJECT_HEADER                    =
       CONTENTS_BIN                     = s_record
       CONTENTS_TXT                     = LT_OBJTXT
      CONTENTS_HEX                     = LV_OUTPUT
      CONTENTS_HEX                     = s_record
      OBJECT_PARA                      =
      OBJECT_PARB                      =
        RECEIVERS                        = IT_RECEIVERS
    EXCEPTIONS
       TOO_MANY_RECEIVERS               = 1
       DOCUMENT_NOT_SENT                = 2
       DOCUMENT_TYPE_NOT_EXIST          = 3
       OPERATION_NO_AUTHORIZATION       = 4
       PARAMETER_ERROR                  = 5
       X_ERROR                          = 6
       ENQUEUE_ERROR                    = 7
       OTHERS                           = 8
    IF SY-SUBRC <> 0.
    MESSAGE 'Mail was not sent' type 'E'.
    else.
      MESSAGE 'Mail was sent Succesfully' type 'S'.
    ENDIF.
    thanks and regards ,
    venkat.

    refer below program
    c_par-preview = space.
        c_par-getotf = 'X'.
        out_opt-tddest = 'EPSON-COMMON'.
        CALL FUNCTION fm_name
          EXPORTING
            control_parameters = c_par
            output_options     = out_opt
            user_settings      = space
            vbeln              = it_vbeln-vbeln
            pdf                = r2
            rbiclear           = c3
          IMPORTING
            job_output_info    = opt
            einv               = einv.
        i_otf = opt-otfdata.
        CALL FUNCTION 'CONVERT_OTF'
          EXPORTING
            format        = 'PDF'
            max_linewidth = 132
          IMPORTING
            bin_filesize  = v_len_in
          TABLES
            otf           = i_otf
            lines         = i_tline.
       IF lv_check EQ 1.
         CALL METHOD cl_gui_frontend_services=>file_save_dialog
           CHANGING
             filename = file_name
             path     = file_path
             fullpath = full_path.
       ENDIF.
        CLEAR full_path.
        move wa_exnum to lv_exnum.
        shift lv_exnum left deleting leading '0'.
        move 'C:\SAPWORKDIR\' to file_path.
        CONCATENATE file_path 'Invoice_E' lv_exnum '.PDF' INTO full_path.
        CALL FUNCTION 'GUI_DOWNLOAD'
          EXPORTING
            bin_filesize = v_len_in
            filename     = full_path
            filetype     = 'BIN'
          IMPORTING
            filelength   = file_size
          TABLES
            data_tab     = i_tline.
    For mailing
        IF ch2 EQ 'X'.
          DATA sub TYPE string.
          CALL FUNCTION 'QCE1_CONVERT'
            TABLES
              t_source_tab         = i_tline
              t_target_tab         = so_ali[]
            EXCEPTIONS
              convert_not_possible = 1
              OTHERS               = 2.
    Mail Contents
          refresh objtxt[].
          objtxt = space.
          APPEND objtxt.
          objtxt = 'Dear Sir/Madam,'.
          APPEND objtxt.
    Determining the Email Ids of Mail Receivers
          PERFORM fetch_mailids.
          objtxt = 'Copy to :'.
          APPEND objtxt.
          LOOP AT reclist.
            objtxt = reclist-receiver.
            APPEND objtxt.
          ENDLOOP.
          objtxt = space.
          APPEND objtxt.
          objtxt = '<This is system generated message>.'.
          APPEND objtxt.
          objtxt = space.
          APPEND objtxt.
    Mail Body of message over.
          DESCRIBE TABLE objtxt[] LINES v_lines_txt.
          CONCATENATE 'Inv.' invno INTO sub SEPARATED BY space.
          doc_chng-obj_name = sub.
          doc_chng-expiry_dat = sy-datum + 10.
    Mail Subject
          refresh objpack[].
          CONCATENATE 'Pricol Dispatch - Invoice' invno '- Reg.' INTO sub SEPARATED BY space.
          doc_chng-obj_descr = sub.
          doc_chng-sensitivty = 'F'.
          doc_chng-doc_size = v_lines_txt * 255.
          objpack-transf_bin = ' '.
          objpack-head_start = 1.
          objpack-head_num = 0.
          objpack-body_start = 1.
          objpack-body_num = v_lines_txt.
          objpack-doc_type = 'RAW'.
          APPEND objpack.
    *PDF Attachment
          DESCRIBE TABLE so_ali[] LINES lineno.
          objpack-transf_bin = 'X'.
          objpack-head_start = 1.
          objpack-head_num = 1.
          objpack-body_start = 1.
          objpack-doc_size = lineno * 255 .
          objpack-body_num = lineno.
          objpack-doc_type = 'PDF'.
          objpack-obj_name = 'INVOICE'.
          objpack-obj_descr = 'Invoice'.
          objpack-obj_langu = 'E'.
          APPEND objpack.
          CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
          EXPORTING
          document_data = doc_chng
          put_in_outbox = 'X'
          commit_work = 'X'
          TABLES
          packing_list = objpack
          contents_txt = objtxt[]
          contents_bin = so_ali[]
    *contents_hex = so_ali[]
          receivers = reclist[]
          EXCEPTIONS
          too_many_receivers = 1
          document_not_sent = 2
          document_type_not_exist = 3
          operation_no_authorization = 4
          parameter_error = 5
          x_error = 6
          enqueue_error = 7
          OTHERS = 8.
          IF sy-subrc = 0.
            PERFORM mail.
            MESSAGE 'Mail sent successfully' TYPE 'S'.
    *SUBMIT RSCONN01 WITH MODE = MODE.
          ENDIF.

  • Create a melody with Labview/ Function Generator

    Hi (first sorry for poor english, not my native language)
    I have a project at school which is creating a melody using Labview and a function generator. I've worked on it for hours now and i still can't get through it.
    I joined the vi file with my post so you can get a look at what i've done so far.
    First, i do'nt know which loop i have to use (u'll understand soon enough if u just take a look at the vi file), the problem is that i want to create 4 arrays using 2 text files.
    The first one is used as a reference : exemple the frequency to play an A is 440Hz, so my first text file looks like that :
    A 440
    B 493
    the second one is my melody, which includes the notes and the tempo (in ms)
     , so it's like :
    B 1000
    C 1500
    I used the first two loops to seperate each string lines of my files so I have at the end 4 different arrays. One containing the note's references, one containing the frequency, one containing my melody's notes and one containing the duration of each notes.
    The problem is that when I use a while loop, it seems that my arrays are not containing every elements it should, it only has the last one. Just try to run the vi file.
    Could anyone give me some help ? Don't hesitate to ask more questions if u didn't fully understand my problem !
    Thx
    Attachments:
    PR.vi ‏19 KB

    Hi claudeuntel,
    Your array contains just the last note because at each for loop iteration a new table is created.
    You have to send the table you created at one iteration to the next one.
    To do this you can use shift register.
    I didn't have tested the VI below but it should looks like that.
    Valentin
    Valentin
    Certified TestStand Architect
    Certified LabVIEW Developer
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    Travaux Pratiques d'initiation à LabVIEW et à la mesure
    Du 2 au 23 octobre, partout en France

  • Problems with the Stanford Reseach Systems DS345 Function Generator

    I'm writing a labview program that will allow operation of the Stanford Reseach Systems DS345 Function Generator. The problem that I'm having is in the amplitude calculation. The way the driver finds the amplitude is by recieving an array of what are essentially y-coordiantes (on a cartesian graph system), finding the max and min of the array, and subtracting them.
    This is where the problem lies. I've designed my program so I can type in an equation, see the graph of this equation, and send the y values into a the subvi provided by the driver. This subvi is the one that finds the amplitude...etc and sends it to the oscilliscope. However, when I use a formula for something as simple as sin(x), it caclulates the amplitude as 2. This is because the max/min values of sin(x) are 1 and -1. So the function generator reads in an amplitude of 2. This amplitude of 2 results in a sine wave that oscillates between 2 and -2. Obviously, this is not what I'm looking for. I know by dividing the sine wave coordiantes by 2, or just using the max/min value to be sent to the function generator as the amplitude will work in this case, but not for all cases (ex: sin(x)*e^(-3x). I'd appreciate any suggestions on how to fix this amplitude problem for all cases.
    In addition to having this sine function, I wrote a subvi that essentially generates a series of pulses depending on the user preferences. It's relativly complicated to explain how it works, but it just sends an array of y-coordinates (similar to above, and they are sent to the same subvi to be sent to the function generator). This array is the one that truly puzzles me.
    For example, I have a single pulse, with height 5. The y array is 10 places big. At index 0 to 3, the y value is 0. At 4 to 6, the value is 5. And from index 7 to 9, the index is zero again (Imagine a pulse "_|-|_" , it may help understand this).
    I send this array of 10 places to the same subvi as the one described in the sine function earlier. I would expect the amplitude to go in as five (max - min), and it does. However, when determining the actual value from the oscilliscope, it turns out to be 10.8 peak to peak voltage. The values range from -.8 volts to 10 volts. I can't imagine why they do not range from 0 to five as specified in the array which is sent.
    If anyone has any answers, suggestions or questions concering this description, I would greatly appreciate it. Feel free to post answers or email me at: [email protected]
    I'll be more than happy to post the files if someone wants to look at them.
    Thanks again,
    Jim Dalton
    North American Lighting
    [email protected]

    I am taking these measurments using the measurment and automation explorer test function. I set my range on all channels to 0-8khz and Have been inputing no more than 8khz. What leads me to believe I have a software or config problem is that I sent in a module to NI for repair and this is the brand new one they sent me back. While testing this module, I also have a 1102 module and 1124 module on the scxi-1000 chasis and both of those are working as specified. I also moved the 1126 module to slot 1 and ran it that way as well when I replaced the chasis.

  • How to send a file from FTP to external server

    My requirement is to send a file from FTP to D3(External) server.
    Now I am able to store the file in Appln server.
    I want to send the file created by the program thru FTP to D3 server.
    I know the username,Password,HostID,RFC destination details.
    How to send the file from FTP to D3.
    If u have any program,Plz send it...
    I dont want the function modules name...I want the example code ....
    Thanks in advance.

    Hi Sumi,
    You could do it so that you create a .bat or .cmd script to your server which does your ftp transfer.
    To do this you must use sm69 to create a external operating system command which you can call from FM SXPG_COMMAND_EXECUTE. To SXPG_COMMAND_EXECUTE you the file you need to transfer as a parameter.
    What happens is that your abap program passes the file to windows batch script (.bat .cmd) which will then do the transfer for you.
    Here's a sample of ftp-script for windows:
    echo open IP_ADDRESS_TO_YOUR_SERVER > c:zftp_transfer.ftp
    echo USERNAME>> c:zftp_transfer.ftp
    echo PASSWORD>> c:zftp_transfer.ftp
    echo put YOUR_FILE>> c:zftp_transfer.ftp
    echo quit>> c:zftp_transfer.ftp
    ftp -s:c:zftp_transfer.ftp
    also take a look here for more details:
    http://support.microsoft.com/?kbid=96269
    Ok, this might be a bit trivial but if your server is unix/aix etc.. Instead of using batch script you must do a shell script.
    Regards,
    Ville

  • Error while sending PDF file by Email

    Hi All,
    I have a requirement to send multiple files by Email attachement from SAP to internet address.
    All files sent correctly, except one PDF file.
    I have 2 spools, and I am using FM CONVERT_OTFSPOOLJOB_2_PDF to get PDF data for Spool.
    Then I am converting the 134 length PDF data to 255 Email Attachement binary table.
    Now I have 2 file F1.PDF and F2.PDF, in SAP Office outbox and in receivers email, F2.PDF opening fine, however for F1.PDF I am getting some error no 109 in Adobe, which says "There was an error processing a page.There was a problem reading this document. (109)".
    Please help in figuring out the reason for this.
    Additional Information F2.PDF has some text data (SAP Script output) and F1.PDF has some text data with logo (SAP Script Output)
    Thanks in advance

    hi check out following code..
    REPORT ZRICH_0003.
    DATA: ITCPO LIKE ITCPO,
    TAB_LINES LIKE SY-TABIX.
    Variables for EMAIL functionality
    DATA: MAILDATA LIKE SODOCCHGI1.
    DATA: MAILPACK LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE.
    DATA: MAILHEAD LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE.
    DATA: MAILBIN LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
    DATA: MAILTXT LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
    DATA: MAILREC LIKE SOMLREC90 OCCURS 0 WITH HEADER LINE.
    DATA: SOLISTI1 LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE.
    PERFORM SEND_FORM_VIA_EMAIL.
    FORM SEND_FORM_VIA_EMAIL *
    FORM SEND_FORM_VIA_EMAIL.
    CLEAR: MAILDATA, MAILTXT, MAILBIN, MAILPACK, MAILHEAD, MAILREC.
    REFRESH: MAILTXT, MAILBIN, MAILPACK, MAILHEAD, MAILREC.
    Creation of the document to be sent File Name
    MAILDATA-OBJ_NAME = 'TEST'.
    Mail Subject
    MAILDATA-OBJ_DESCR = 'Subject'.
    Mail Contents
    MAILTXT-LINE = 'Here is your file'.
    APPEND MAILTXT.
    Prepare Packing List
    PERFORM PREPARE_PACKING_LIST.
    Set recipient - email address here!!!
    MAILREC-RECEIVER = '[email protected]'.
    MAILREC-REC_TYPE = 'U'.
    APPEND MAILREC.
    Sending the document
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    DOCUMENT_DATA = MAILDATA
    PUT_IN_OUTBOX = ' '
    TABLES
    PACKING_LIST = MAILPACK
    OBJECT_HEADER = MAILHEAD
    CONTENTS_BIN = MAILBIN
    CONTENTS_TXT = MAILTXT
    RECEIVERS = MAILREC
    EXCEPTIONS
    TOO_MANY_RECEIVERS = 1
    DOCUMENT_NOT_SENT = 2
    OPERATION_NO_AUTHORIZATION = 4
    OTHERS = 99.
    ENDFORM.
    Form PREPARE_PACKING_LIST
    FORM PREPARE_PACKING_LIST.
    CLEAR: MAILPACK, MAILBIN, MAILHEAD.
    REFRESH: MAILPACK, MAILBIN, MAILHEAD.
    DESCRIBE TABLE MAILTXT LINES TAB_LINES.
    READ TABLE MAILTXT INDEX TAB_LINES.
    MAILDATA-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( MAILTXT ).
    Creation of the entry for the compressed document
    CLEAR MAILPACK-TRANSF_BIN.
    MAILPACK-HEAD_START = 1.
    MAILPACK-HEAD_NUM = 0.
    MAILPACK-BODY_START = 1.
    MAILPACK-BODY_NUM = TAB_LINES.
    MAILPACK-DOC_TYPE = 'RAW'.
    APPEND MAILPACK.
    Creation of the document attachment
    This form gets the OTF code from the SAPscript form.
    If you already have your OTF code, I believe that you may
    be able to skip this form. just do the following code, looping thru
    your SOLISTI1 and updating MAILBIN.
    PERFORM GET_OTF_CODE.
    LOOP AT SOLISTI1.
    MOVE-CORRESPONDING SOLISTI1 TO MAILBIN.
    APPEND MAILBIN.
    ENDLOOP.
    DESCRIBE TABLE MAILBIN LINES TAB_LINES.
    MAILHEAD = 'TEST.OTF'.
    APPEND MAILHEAD.
    Creation of the entry for the compressed attachment
    MAILPACK-TRANSF_BIN = 'X'.
    MAILPACK-HEAD_START = 1.
    MAILPACK-HEAD_NUM = 1.
    MAILPACK-BODY_START = 1.
    MAILPACK-BODY_NUM = TAB_LINES.
    MAILPACK-DOC_TYPE = 'OTF'.
    MAILPACK-OBJ_NAME = 'TEST'.
    MAILPACK-OBJ_DESCR = 'Subject'.
    MAILPACK-DOC_SIZE = TAB_LINES * 255.
    APPEND MAILPACK.
    ENDFORM.
    Form GET_OTF_CODE
    FORM GET_OTF_CODE.
    DATA: BEGIN OF OTF OCCURS 0.
    INCLUDE STRUCTURE ITCOO .
    DATA: END OF OTF.
    DATA: ITCPO LIKE ITCPO.
    DATA: ITCPP LIKE ITCPP.
    CLEAR ITCPO.
    ITCPO-TDGETOTF = 'X'.
    Start writing OTF code
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
    FORM = 'ZTEST_FORM'
    LANGUAGE = SY-LANGU
    OPTIONS = ITCPO
    DIALOG = ' '
    EXCEPTIONS
    OTHERS = 1.
    CALL FUNCTION 'START_FORM'
    EXCEPTIONS
    ERROR_MESSAGE = 01
    OTHERS = 02.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    WINDOW = 'MAIN'
    EXCEPTIONS
    ERROR_MESSAGE = 01
    OTHERS = 02.
    Close up Form and get OTF code
    CALL FUNCTION 'END_FORM'
    EXCEPTIONS
    ERROR_MESSAGE = 01
    OTHERS = 02.
    MOVE-CORRESPONDING ITCPO TO ITCPP.
    CALL FUNCTION 'CLOSE_FORM'
    IMPORTING
    RESULT = ITCPP
    TABLES
    OTFDATA = OTF
    EXCEPTIONS
    OTHERS = 1.
    Move OTF code to structure SOLI form email
    CLEAR SOLISTI1. REFRESH SOLISTI1.
    LOOP AT OTF.
    SOLISTI1-LINE = OTF.
    APPEND SOLISTI1.
    ENDLOOP.
    ENDFORM.

Maybe you are looking for