Send series of SPI commands from DAQ

I have created my SPI waveforms and then split them up and sent them to 5 different lines on my DAQmx (I have two CS lines). 
The slaves here are two PGAs and the MOSI line is setting the gain to one of 11 programmable gains; I have a Ring (drop-down menu) set up for the user to select the gain which is fed in to the MOSI data port on the SPI swap VI. My problem: I need to send initial commands to the slave to configure a pin on the slave (PGA), before I use the Ring to select the gain. How can I send initial commands on the MOSI line to "set" the slave, and then use my Ring to select/change the gain? How can I send a series of commands via SPI before the user selects the command to send to MOSI?
I am using the DAQ 6356 which has no way to recognize SPI protocol so I used SDW to generate my waveforms.

Please refer to this forum thread.
Jeff S.
National Instruments

Similar Messages

  • Send ASCII String as Command to Modbus Ethernet Device

    Hello Precious Developers,
    How do we send the following string command from a PC to a Modbus Ethernet device at starting address 411000 using LVDSC:
    "<ID 0><CLR><WIN 0 0 287 31><POS 0 0><LJ><BL N><CS 2><RED><T>H</T>""$0D""$0A"
    (Function code 16 - Write multiple Holding registers)
    Any pointers / suggestions / example code shall be deeply appreciated.
    Solved!
    Go to Solution.

    hi,
    I implemented your solution but when there is an odd number of character, the last character is not included in the  u16 array. Is my implemented correct?
    Regards,
    Cedric
    Attachments:
    string_transfert_MODBUS.vi ‏7 KB

  • Run multiple unix commands from ODI procedure

    I want to run a series of unix commands from ODI procedure. I dont want to use Unix shell scripts. (I know that works).I am just trying to place the contents of the shell scripts in ODI procedure with Operating system as technology. But I am unable to execute the proecedure.
    For example below is a very small 3 line commands I would execute
    filename="/var/test.txt"
    ls -l $filename > /var/anotherfile.txt
    chmod 777 $filename
    I am not sure if there is any specific syntax that I have to follow for executing unix commands. Also I dont want to write a Jython and use os.system command as well.
    Appreciate any help on this

    First your original question... You can put more than one DOS command on a single line, simply separate each command with an ampersand (&). For example:
    mkdir c:\abc & cd abc & dir*
    Regarding your concerns about performance, well that would depend on exactly what you mean. Using CLIENT_HOST (or HOST on the server) simply opens a shell (DOS in this case) then passes your command to it. The performance of performing this action really isn't measurable. Basically you are just pressing a button and you should get a near immediate action. As for the performance of executing each command, that has nothing to do with Forms. Once the command is passed to the shell, the rest is a function of the shell and whatever command you passed.
    Having said that, if you were to write something sloppy like a loop (in pl/sql) which called CLIENT_HOST lots of times repeatedly, then yes there would be a performance problem because the pushing of the button will cause an exchange to and from the server and each cycle in the loop will do the same.
    So the answer to how performance is impacted will depend on what exactly you need to accomplish. If it is a single call to CLIENT_HOST, this should be fine.

  • My HP Color Laserjet CP1215 only prints when sending a command from a distant computer (shared pr.)

    My HP Color Laserjet CP1215 won't print when I send a print command from the computer to which the printer is connected to.  The printer is shared. When my colleague sends a print command from another computer, the printer does his job.

    I am currently in the same boat. I love how you posted this legitimate issue 3 years ago and there is still no resolution. It really reflects on the company's character and attitude toward their customers.
    Hopefully this will get a response.

  • How to send a command from a vc++.exe to LABVIEW.exe in order to control the button on the LABVIEW.exe

    Hello, everyone. Using VC++, I have gotten the handle of a *.exe(built by Labview), but I cannot get the button handle. I want to get the button handle and post the message to control the button. How can I do that? When I use the SPY++, the *.exe(built by Labview) have not any child windows which is very different from the *.exe(built by VC++). In SPY++, what is the LVDChild class? How can I send the message to control the button on *.exe(built by Labview)???
    That is  to send a command from a vc++.exe to LABVIEW.exe in order to control the button on the LABVIEW.exe. How can I get it ?
    Thank you!

    hummingbird wrote:
    Thank you! But I dont kown how to use vi server to raise a value signalling event. Can we put vi server into the vc program? Can you give me some more information or some examples, hehe!
    hummingbird
    Checkout the LabVIEW ActiveX server interface in the User Manual in Chapter 20, Windows Connectivity and the VI Server Reference in Chapter 17, Programmatically Controlling VIs.
    There is a sample for Visual Basic under examples/comm/VBtoLV.frm, which should be quite simple to translate to Visual C as long as you can figure out the basics of ActiveX programming in VC (I have never done anything with ActiveX in VC). For those basics I would recommend some text book or MSDN.
    Rolf Kalbermatter 
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Sending novell command from PHP

    Hi,
    I am trying to unzip a file from php.
    I am trying to run a unzip command from phpm but the novell server won't take it.
    when i do: <?php exec("unzip DATA1:/zipfile.zip"); ?>
    i get: unable to find load file SYS:/TMP/UNZIP
    when i do: <?php exec("echo unzip DATA1:/zipfile.zip"); ?>
    i get: unable to find load file SYS:/TMP/ECHO
    when i do: <?php exec("echo unzip "); ?>
    i get: unzip.nlm load status KenelOnly
    Does someone know how to send a command from php to Novell correctly??
    Thank you,

    Have you tried specifying the path with something like
    <?php exec("sys:/system/unzip DATA1:/zipfile.zip"); ?>
    Wolfgang
    "Flex Travel - Higo Rocha Cidario" <[email protected]> wrote in message
    news:oE0uh.7409$[email protected]..
    > Hi,
    >
    > I am trying to unzip a file from php.
    > I am trying to run a unzip command from phpm but the novell server won't
    > take it.
    >
    > when i do: <?php exec("unzip DATA1:/zipfile.zip"); ?>
    > i get: unable to find load file SYS:/TMP/UNZIP
    >
    > when i do: <?php exec("echo unzip DATA1:/zipfile.zip"); ?>
    > i get: unable to find load file SYS:/TMP/ECHO
    >
    > when i do: <?php exec("echo unzip "); ?>
    > i get: unzip.nlm load status KenelOnly
    >
    > Does someone know how to send a command from php to Novell correctly??
    >
    > Thank you,
    >

  • Pls help in sending multiple resposes after analysing the sequential commands from the device

    Hi all
    pls help me in  sending sequential responses for the different commands. For example,i have to send the response1 for command1 then again host wll send the some other command ,say command 2  after receiving response 1,then again i have to respond to the corresponding command.i m using the pci-6221 card not tradition DAQcard.
    regards,
    nitin

    Hello nitin,
    It sounds like you are looking for some examples on how to program your
    6221 DAQ board.  I highly reccomend taking a look at the LabVIEW
    shipping examples that install with the DAQ driver.  To access
    them, open the NI Example Finder by going to the menu bar of a VI and
    selecting Help >> Find Examples...
    If you have any specific questions, please feel free to ask!
    Eric
    DE For Life!

  • Sending sysex commands from MainStage

    Has anyone figured out a way to send sysex sequences from MainStage when changing patches? I need to use sysex to switch one of my keyboards between its "Program" and its "Combi" mode and I don't see anything obvious in MS 2 to do this.
    I suppose it will be necessary to use an external utility like MidiPipe or Bidule or Max to listen for special MIDI commands from MainStage and then generate sysex messages but I thought I'd check first to see if anyone has an easier method.

    AFAIK - there is no way to send sysex from MainStage 2. Maybe Applescript can do it? MainStage can execute Applescripts.

  • Sending OS command from PL/SQL procedure

    "How can I send a operating system comand from PL/SQL procedure?
    I want to move , to copy , delete a file from a PL/sql procedure. i.e under unix send mv, cp or
    rm command";
    my e-mail is [email protected]

    take a look at
    http://asktom.oracle.com/pls/ask/f?p=4950:8:881946
    regards
    Freek D'Hooge
    "How can I send a operating system comand from PL/SQL procedure?
    I want to move , to copy , delete a file from a PL/sql procedure. i.e under unix send mv, cp or
    rm command";
    my e-mail is [email protected]

  • Sending down Linux commands from database

    Hello
    Im working with Oracle 10.2.0.4.3 on Linux SuSE FUSE Version 2.3.0-RC0-SL0/SLES-9.
    Im currently doing an extract of BLOB files down to a directory on the server.
    When I do the extract the Oracle user becomes the owner of the files and my own user doesn't have the access (neither read or write) to the files.
    I cannot receive Oracle access due a security issue so Im wondering if its possible to send down a command from the database that does a
    $chmod a+rw my_directory/*.* ?
    Iv looked into the some forums and I didnt find anything in particulate that would help me, so Im wondering if any of you know if this is possible ?
    BR / SA

    Hello
    Thank you for your advice but the question was to send down Linux commands from the DB, not do anything in the Linux enviroment.
    Here is a good place to start that I found on the net.
    public class JShellCommand {
    public static int execute(String cmd) {
    try
    String[] shellCmd = { "/bin/sh", "-c", cmd };
    Process process = Runtime.getRuntime().exec(shellCmd);
    int exitVal = process.waitFor();
    return (exitVal);
    catch (Exception e)
    return 1;
    load it into db with loadjava and wrap it with:
    CREATE OR REPLACE
    FUNCTION Shell_Command(
    p_CMD IN VARCHAR2
    RETURN NUMBER
    AS
    LANGUAGE JAVA
    NAME 'JShellCommand.execute(java.lang.String) return int';
    For OS command you can use:
    public class JCommand {
    public static int execute(String cmd) {
    try
    Process process = Runtime.getRuntime().exec(cmd);
    int exitVal = process.waitFor();
    return (exitVal);
    catch (Exception e)
    return 1;
    and
    CREATE OR REPLACE
    FUNCTION OS_Command(
    p_Cmd IN VARCHAR2
    RETURN NUMBER
    AS LANGUAGE JAVA
    NAME 'JCommand.execute(java.lang.String) return int';
    /

  • How to run multiple DOS commands from a single Webutil Client_Host session?

    Hello all,
    I have a requirement where I need to create an interface with SVN from Forms for basic checkin-checkout of files.
    So, I've been trying to use webutil client_host to open a command line session and issue svn commands.
    For svn, sometimes I need to give multiple commands like change to a particular directory and then run an svn command.
    But client_host takes in only one command at a time and I'm unable to issue a series of DOS commands to perform
    a particular task.
    Is there a way to do this?
    Pls suggest.
    Regards,
    Sam

    First your original question... You can put more than one DOS command on a single line, simply separate each command with an ampersand (&). For example:
    mkdir c:\abc & cd abc & dir*
    Regarding your concerns about performance, well that would depend on exactly what you mean. Using CLIENT_HOST (or HOST on the server) simply opens a shell (DOS in this case) then passes your command to it. The performance of performing this action really isn't measurable. Basically you are just pressing a button and you should get a near immediate action. As for the performance of executing each command, that has nothing to do with Forms. Once the command is passed to the shell, the rest is a function of the shell and whatever command you passed.
    Having said that, if you were to write something sloppy like a loop (in pl/sql) which called CLIENT_HOST lots of times repeatedly, then yes there would be a performance problem because the pushing of the button will cause an exchange to and from the server and each cycle in the loop will do the same.
    So the answer to how performance is impacted will depend on what exactly you need to accomplish. If it is a single call to CLIENT_HOST, this should be fine.

  • O/s commands from PL/SQL

    hi all..
    i want to execute operating system commands from PL/SQL..
    particulary imp command....
    i have used the f/wg approach but while i execute the imp command it does not responds me any output..
    I have to kill the process from o/s.
    prodn is my user
    --AS SYS user
    begin
    dbms_java.grant_permission( 'PRODN',
    'SYS:java.io.FilePermission',
    '/oracle/product/9.2.0/bin/imp',
    'execute' );
    dbms_java.grant_permission
    ('PRODN',
    'java.lang.RuntimePermission',
    'writeFileDescriptor' );
    end;
    ---------------------------------AS PRODN user
    create or replace and compile
    java source named "Util"
    as
    import java.io.*;
    import java.lang.*;
    public class Util extends Object
    public static int RunThis(String args)
    Runtime rt = Runtime.getRuntime();
    int rc = -1;
    try
    Process p = rt.exec(args);
    int bufSize = 4096;
    BufferedInputStream bis = new BufferedInputStream(p.getInputStream(),
    bufSize);
    int len;
    byte buffer[] = new byte[bufSize];
    // Echo back what the program spit out
    while ((len = bis.read(buffer, 0, bufSize)) != -1)
    System.out.write(buffer, 0, len);
    rc = p.waitFor();
    catch (Exception e)
    e.printStackTrace();
    rc = -1;
    finally
    return rc;
    create or replace
    function RUN_CMD(p_cmd in varchar2) return number
    as
    language java
    name 'Util.RunThis(java.lang.String) return integer';
    create or replace procedure RC(p_cmd in varchar2)
    as
    x number;
    begin
    x := run_cmd(p_cmd);
    end;
    i executed the command as follows in sql>
    BEGIN
    rc('/oracle/product/9.2.0/bin/imp tim/tim file=/home/oracle/vas4359.dmp log
    =log1.log');
    END;
    it runs fine creates log1.log in / home/oracle but there is no output in
    log1.log file.
    I have to kill the process as follows after which sql> displays me :
    "PL/SQL procedure successfully completed."
    [oracle@msebdb oracle]$ ps aux|grep imp
    oracle 20052 0.0 0.2 12732 4328 ? S 11:57 0:00 /oracle/product/
    .2.0/bin/imp file=/home/oracle/vas4359.dmp log=log1.log
    oracle 20102 0.0 0.0 3692 652 pts/2 S 12:03 0:00 grep imp
    Note:There is no tim user.. i just want to get error in my log file..
    my further steps are to read this log file and send email/notifications to users.
    my main program is as f/ws:
    /*imp and check log file*/
    create or replace procedure abc
    as
    v_exists boolean;
    v_exists_log boolean;
    ex_open BOOLEAN;
    flen NUMBER;
    bsize NUMBER;
    vInHandle_open utl_file.file_type;
    vInHandle_open_log utl_file.file_type;
    v_filelog utl_file.file_type;
    v_fl utl_file.file_type;
    v_pth varchar2(60);
    v_fnm varchar2(60);
    v_file_exists varchar2(60);
    v_logline varchar2(30) ;
    v_search varchar2(30) :='ORA-';
    vNewLine VARCHAR2(32767);
    cursor c_fname is
    select full_pth ,f_name from upld_file_t where f_name in
    (select f_name from tbl_file_nm where typ_file='D' AND DEL_FLG='N');
    BEGIN
    for v_sec in c_fname
    loop
    utl_file.fgetattr(LOCATION=>'ORALOAD',
    FILENAME=>v_sec.f_name,
    FEXISTS=>v_exists,
    FILE_LENGTH=> flen,
    BLOCK_SIZE=>bsize);
    if v_exists
    THEN
    dbms_output.put_line('File Exists' || v_sec.f_name);
    v_file_exists:=v_sec.f_name;
    --dbms_output.put_line('v_file_exists ' || v_file_exists);
    dbms_output.put_line('File Length: ' || TO_CHAR(flen));
    dbms_output.put_line('Block Size: ' || TO_CHAR(bsize));
    dbms_output.put_line(' before file open');
    vInHandle_open := utl_file.fopen('ORALOAD',v_sec.f_name,'R',32767);
    -- dbms_output.put_line(' after file open');
    -- do whater with teh file data
    v_fl:=utl_file.fopen('ORALOAD','v_sec.f_name','W');
    dbms_output.put_line('v_sec.f_name');
    IF utl_file.is_open(vInHandle_open)
    THEN
    /*if log file exists..*/
    utl_file.fgetattr(LOCATION=>'ORALOAD',
    FILENAME=>v_sec.f_name||'.log',
    FEXISTS=>v_exists_log,
    FILE_LENGTH=> flen,
    BLOCK_SIZE=>bsize);
    if v_exists_log
    then
    dbms_output.put_line('file' ||v_sec.f_name||'.log');
    v_filelog :=utl_file.fopen('ORALOAD',v_sec.f_name||'.log','W',32767);
    LOOP
    BEGIN
    UTL_FILE.PUT(v_filelog,'ORA-');
    exit;
    END;
    END LOOP;
    else
    dbms_output.put_line('File not found' || v_sec.f_name);
    END IF;
    UTL_FILE.fclose(v_filelog);
    dbms_output.put_line('Closed File ' || v_sec.f_name|| '.log');
    END IF;
    /*imp THE FILE and read log file*/
    utl_file.fgetattr(LOCATION=>'ORALOAD',
    FILENAME=>v_sec.f_name||'.log',
    FEXISTS=>v_exists_log,
    FILE_LENGTH=> flen,
    BLOCK_SIZE=>bsize);
    if v_exists_log
    then
    dbms_output.put_line('file' ||v_sec.f_name||'.log');
    v_filelog :=utl_file.fopen('ORALOAD',v_sec.f_name||'.log','R',32767);
    LOOP
    BEGIN
    UTL_FILE.get_line(v_filelog,v_logline);
    if v_logline = v_search then
    dbms_output.put_line(v_logline);
    end if;
    UTL_FILE.fclose(v_filelog);
    dbms_output.put_line('Closed File ' || v_sec.f_name|| '.log');
    exit;
    END;
    END LOOP;
    else
    dbms_output.put_line('File not found' || v_sec.f_name);
    END IF;
    END IF;
    END LOOP;
    --close the curosr .. check this
    EXCEPTION
    WHEN UTL_FILE.ACCESS_DENIED THEN
    DBMS_OUTPUT.PUT_LINE('No Access!!!');
    when others then
    dbms_output.put_line('ERROR (open_file) => '||sqlcode);
    dbms_output.put_line('MSG (open_file) => '||sqlerrm);
    end;

    Hi,
    You might have better luck in the PL/SQL or Java forums. They are located here:
    PL/SQL: PL/SQL
    Java: http://forums.oracle.com/forums/forum.jsp?forum=99
    Good luck,
    Mark

  • Mail Server issues: non-SMTP command from localhost

    I just installed Yosemite server. Noticed these messages showing up in the log:
    Oct 28 06:32:08 my_server.net postfix/smtpd[28380]: warning: non-SMTP command from localhost[127.0.0.1]: From: Mrs. M.M Macheda <[email protected]>
    Oct 28 06:32:08 my_server.net postfix/smtpd[28382]: warning: non-SMTP command from localhost[127.0.0.1]: From: Mrs. M.M Macheda <[email protected]>
    Oct 28 06:32:08 my_server.net postfix/smtpd[28380]: disconnect from localhost[127.0.0.1]
    Oct 28 06:32:08 my_server.net postfix/smtpd[28382]: disconnect from localhost[127.0.0.1]
    Oct 28 06:32:08 my_server.net postfix/postscreen[27405]: CONNECT from [127.0.0.1]:52786 to [127.0.0.1]:25
    Oct 28 06:32:08 my_server.net postfix/postscreen[27405]: WHITELISTED [127.0.0.1]:52786
    Oct 28 06:32:08 my_server.net postfix/postscreen[27405]: CONNECT from [127.0.0.1]:52787 to [127.0.0.1]:25
    Oct 28 06:32:08 my_server.net postfix/postscreen[27405]: WHITELISTED [127.0.0.1]:52787
    Oct 28 06:32:08 my_server.net postfix/postscreen[27405]: CONNECT from [127.0.0.1]:52788 to [127.0.0.1]:25
    Oct 28 06:32:08 my_server.net postfix/postscreen[27405]: WHITELISTED [127.0.0.1]:52788
    Oct 28 06:32:08 my_server.net postfix/postscreen[27405]: CONNECT from [127.0.0.1]:52789 to [127.0.0.1]:25
    Oct 28 06:32:08 my_server.net postfix/postscreen[27405]: WHITELISTED [127.0.0.1]:52789
    Oct 28 06:32:08 my_server.net postfix/smtpd[28371]: connect from localhost[127.0.0.1]
    Oct 28 06:32:08 my_server.net postfix/smtpd[28371]: improper command pipelining after EHLO from localhost[127.0.0.1]: MAIL FROM:<[email protected]>\\r\\nRCPT TO:<[email protected]\\r>\\r\\nDATA\\r\\nFrom: Mrs. M.M Macheda
    Oct 28 06:32:08 my_server.net postfix/smtpd[28386]: connect from localhost[127.0.0.1]
    Oct 28 06:32:08 my_server.net postfix/smtpd[28386]: improper command pipelining after EHLO from localhost[127.0.0.1]: MAIL FROM:<[email protected]>\\r\\nRCPT TO:<[email protected]\\r>\\r\\nDATA\\r\\nFrom: Mrs. M.M Macheda <he
    Here is output of postconf -n
    biff = no
    command_directory = /usr/sbin
    config_directory = /etc/postfix
    daemon_directory = /usr/libexec/postfix
    data_directory = /var/lib/postfix
    debug_peer_level = 2
    debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
    html_directory = /usr/share/doc/postfix/html
    inet_interfaces = loopback-only
    inet_protocols = all
    mail_owner = _postfix
    mailbox_size_limit = 0
    mailq_path = /usr/bin/mailq
    manpage_directory = /usr/share/man
    message_size_limit = 10485760
    mynetworks = 127.0.0.0/8, [::1]/128
    newaliases_path = /usr/bin/newaliases
    queue_directory = /private/var/spool/postfix
    readme_directory = /usr/share/doc/postfix
    recipient_delimiter = +
    sample_directory = /usr/share/doc/postfix/examples
    sendmail_path = /usr/sbin/sendmail
    setgid_group = _postdrop
    smtpd_client_restrictions = permit_mynetworks permit_sasl_authenticated permit
    smtpd_tls_ciphers = medium
    tls_random_source = dev:/dev/urandom
    unknown_local_recipient_reject_code = 550
    Except me nobody has access to the server yet. Nobody is sending out any emails. Appreciate any help.

    What does /var/log/mail.log have to say (you may need to increase logging level to "Information")?

  • Run OS command from Pl/SQL

    Is there any way to execute an OS command from pl/sql other than using dbms_pipe & pro*C combo. I have done this way before but it seems there is built-in oracle package which can do this in 8/8i.
    Also HOST command in forms will execute the OS coomand from the clinet. Is there any way to execute the OS command on the server from the forms clinet?
    thanks,
    Ravi.
    null

    Ravi,
    Can you send me an example how one can
    execute a this command from a PL/SQL
    program 'sed 3q /etc/passwd'.
    Please write to me at
    [email protected]
    thanks
    Pramod

  • [SOLVED] Alpine - Error sending: No default posting command

    Hi, I have installed the Alpine mail client yesterday, and it all works nicely, except I can't send mail. Everytime I try I get this message:
    Error sending: No default posting command
    I have tried googling around, and from what I understand Alpine uses sendmail by default, but I haven't got it installed, nor I can find it in the repos. Is there any way I can change this? And what can I use to send mail?
    Thanks.
    Last edited by finferflu (2007-12-26 16:02:13)

    I haven't dug it enough yet, and I'm not sure that this is possible, even though Alpine is very customisable as far as I can see.
    I'll let you know if I find anything

Maybe you are looking for