How to read 2 analog inputs with VISA

Hello everyone! I want to read two analog inputs using VISA serial communication from the arduino.  I'm currently able to read one of the input but how do I read two analog inputs on labview?

Hi lamela,
again I have to ask: HOW does the string look like? Is it so hard to provide an exact example of your received string???
I think the string is showing one value from the two inputs
Are you sure or are you guessing? How can we tell what you might "think" when you aren't able to provide examples?
You wrote you send values from the Arduino using the command "println(value1, value2)", but now you "think" you only receive ""value1" in LabVIEW?
Get your data communications clear! (And learn to provide meaningful examples!)
Edit after your edit:
my code to serial print two inputs: Serial.println(Voltage, Current);
Even if I print separately: Serial.println(Voltage);
                                             Serial.println(Current);
The first command is completely different then the second part! In the first you should receive two values in one line, in the 2nd one you receive one value per line: You need to adapt your string parsing to these strings!
Again: send both values in one line. Use the LF as termchar. Separate the values by some separator char like comma. Check the received string for validity. Use some error checking in your VI.

Similar Messages

  • How to read the 'Input help with fixed values' of domain .

    How to read the 'Input help with fixed values' of domain .
    The domain has a Value range i want to read those values .
    Are these values stored in any table ?
    Plz help me i need it ver badly...
    Thanks in Advance...

    Hi Chandra Shekhar,
    To read the 'Input help with fixed values' of domain , you can use the function module : HR_P_GET_FIXED_VALUE_TEXT.
    iIf you enter the domain name, you will find the fixed values entered in the domain.
    These values are stored in a table DD07L(DD zero 7 L). Here the values are stored based on domain name.
    See if it works for you.
    Award points if its helpful.
    Regards,
    Bhanu

  • Reading analog input

    Good day all,
    I'm using NI-7350, LAbview 8.5 and trying to measure voltage from a power source.
    Is there any VIs that read analog inputs. I can't seem to open the examples. 
    Thanks 
    Solved!
    Go to Solution.

    Have you looked at the DAQmx? Create a virtual channel, start the task and read the value.
    http://zone.ni.com/devzone/cda/tut/p/id/5370

  • How to read analogue input signal in NI 9201 module using lab view

    hi all
    iam using Crio 9012 module for real time controller
    nd iam using NI-9201 for input and NI9263 for output
    i have configures cRIO 9012 on my Pc
    but how i will take analog input using NI-9201 module
    thanks
    tc
    Solved!
    Go to Solution.

    Hello,
    I would recommend taking a look at the following examples in the LabVIEW Example Finder.  If you go to help-->Find Examples, you will see this window.  Just search for 9201 and you'll see these 2 examples:
    Hope this helps!
    Tejinder Gill
    National Instruments
    Applications Engineer
    Visit ni.com/gettingstarted for step-by-step help in setting up your system.

  • Failure to read analog inputs

    I have a USB6008 with amplified thermocouple signals coming in to the first 4 analog input ports. I have installed DAQmx3.1 on my mac and am trying to use the nidatalogger to read any values from them. Unfortunately I can not seem to read any of the analog ports. In nidatalogger i am given the choice of physical ports 1-7 all of which do not react to analog inputs on the board. They do however react when I apply voltages to some of the digital input pins, most noticable port 30. I am completely confused and since things like MAX dont exsist for the mac, I have no clue how to go about figuring out what is wrong. Help!

    Thanks for posting on the NI Forums!  I understand you are having trouble reading data from your analog inputs on the USB-6008.  I am confused as to what terminals you are using.  You mentioned that you are using the first 4 analog input ports. 
    -  Does this mean you are connecting wires into terminals 2, 5, 8 and 11? 
    -  How many thermocouples are you using? 
    -  Is your input configuration single ended or differential?
    Please refer to page 13 of the NI USB 6008 User Guide and Specifications, and clarify which terminals you are physically wiring to.  You had also mentioned port 30, however if you look on page 14 you can see that terminal 30 corresponds to the +2.5 V pin.
    General DAQ Troubleshooting and FAQ under Mac OS
    Rod T.

  • How to synchronize analog input and output from two different USB daq boards

    Hi all,
    I have two very differnt USB boards the NI USB 6008, which I am using to acquire the data (Analog Input) and a NI USB 9263, it is an Analog Output only board that I am using to deliver a signal (in this case a square pulse). The reason why I am not using the 6008 Analog Ouputs is because I need to deliver negative voltages and need the full +/-10V range.
    Looking at similar posts I am pretty sure that I can't use an external trigger or a shared clock, I also tried to use the synchronization of timed structures but no cigar.
    I am including a quick vi that I whipped out showing how the signal jitters due to the lack of synchronization. The AO from the 9263 connects to the AI in the 6008 in this example.
    Solved!
    Go to Solution.
    Attachments:
    Test Pulse.vi ‏117 KB

    I talked to a specialist in the phone and tols me that it is not possible.

  • How to read the input FORMAT of a Checkbox in list.

    hi,
    suppose i have,
    WRITE CHK1 AS CHECKBOX INPUT OFF.
    Now i have, grayed check box,
    Problem. how to read from program, whether the checkbox is input off or on.
    pls reply

    Hi,
    Check this example of how to use the Checkbox in a list..
    REPORT ztest NO STANDARD PAGE HEADING.
    DATA: BEGIN OF itab OCCURS 0,
                check,
                value(20),
              END OF itab.
    SET PF-STATUS 'TEST1'.
    itab-value = 'ETSAT'.
    APPEND itab.
    itab-value = 'ETSATADSF'.
    APPEND itab.
    itab-value = 'ETSAT'.
    APPEND itab.
    LOOP AT itab.
      WRITE: / itab-check AS CHECKBOX,
                    itab-value.
    ENDLOOP.
    AT USER-COMMAND.
      DATA: wa LIKE itab.
      DATA: itab_download LIKE itab OCCURS 0 WITH HEADER LINE.
      IF sy-ucomm = 'DOWNLOAD'.
        DESCRIBE TABLE itab.
        DO sy-tfill TIMES.
          READ LINE sy-index FIELD VALUE itab-check.
          IF sy-subrc <> 0.
            EXIT.
          ENDIF.
          CHECK itab-check = 'X'.
          itab_download-value = itab-value.
          APPEND itab_download.
        ENDDO.
       download
        call function 'WS_DOWNLOAD'
             exporting
                  filename = 'C:\TEST.XLS '
             tables
                  data_tab = itab_download.
      ENDIF.
    Thanks,
    Naren

  • Getting an error 33162 when trying to read analog input on FP

    I am getting a error when trying to do a simple analog input read using Field Point. I have a FP-2000 network module and am trying to read channel 0 at FP-TB-10 @3 which has an AI-C420 analog input module in place. There is no definition for the error and I can read the signal from Field Point Explorer just fine.
    I have downloaded the example continuous read vi from the web site and it does not work either. It seems that this should not be complicated but this is not the 1st problem I have had. I will take any suggestions. Thank you.

    Mike,
    Error code 33162, "Can not connect to item on module," generally is the result of attempting to connect to an item that is not available at the first connection attempt. This is frequently the result of an ethernet network module being offline when you attempt to connect to it. Since you are able to connect from FieldPoint Explorer, I suspect something else is going on. The likeliest possibilities that I can think of are:
    1) You have more than one ethernet Comm Resource in your IAK file and you have provided the name for the wrong resource (e.g. you may have had a different IP address and created a new Comm Resourcefor the new IP address, but left the old one in place and are using the wrong one).
    2) Similar to #1 above, you changed the IP address in
    the Comm Resource but did not save the change so there is no module at the IP address it is attempting to communicate with.
    3) There is a misconfiguration in the IAK file and the FP-TB-10 shows a listing for a digital module at address 0 rather than an analog module.
    4) The module is misaddressed. I have occasionally seen instances where the protective end cover was not installed on the last terminal base and a piece of metal shorted some of the pins causing the addressing to be incorrect. Since this method of failure would also show up in FieldPoint Explorer, I do not think it is likely the root cause of your problem.
    5) You have booted the FP-20xx in Safe Mode (although FieldPoint Explorer will not work in this case so I do not think it is likely).
    Note: If you had successfully connected and then lost the connection, the error code is 33163, "The connection to the module has been broken."
    Regards,
    Aaron

  • Error -200072 using analog input with 3 PXI 6120 cards on realtime mx system

    I have just upgraded to the mx drivers for the 6120 S series boards.
    I am trying to sample 12 analog inputs at once with a pretrigger. (4 channels per board)
    The error message -200072 comes up.
    One board works fine, when I add the second board's channels the error occurs.
    Each board shows up as A,B,C respectively in MAX and in the Labview browse menu for selecting channels.
    Greg Morningstar
    Takata

    Probably the best way to do this would simply be to use the Route Signal VI to make it to where each of your boards looks at a particular line for the trigger. You can do the same thing for the clock so that they are all sampling at the same time.
    You will also want to make sure that your device is defined in MAX. Once you do that, everything should be pretty easy to implement. You might also want to look at some of the examples that show how to do RTSI. It's almost the same as you would do for a PXI system.
    Otis
    Training and Certification
    Product Support Engineer
    National Instruments

  • I can not read Analog input (a square wave)

    I am programming with Labview 7.1 on FPGA. The hardware is PCI7831. With CB-68LP connector, I connect analog input (a square wave generator) to AI0+(68) and AIGND0(67). I try to read it with waveform chart. But I can't get a square wave on the screen. I did check the square wave generator's output. It is correct. The connector CB-68LP connected with PCI7831 on analog port.
    I am runing the program on emulation, not on real FPGA.
    Thanks

    Signal generator I used is 3010 function generator for BK precision. It is an old instrument. I probed output signal from this generator on oscilloscope with signal generator output conected to oscilloscope probe (+) and signal generator ground to probe (groud). It is a square wave.
    I suspect the teminal I used for I/O port to PCI7831. Because my coworkers installed the hardware for me, he is absent recently. The terminal is CB-68LP  from NI with numbers ( 1 to 68) to specify each connector on it. And I got a SCB-68 Quick Reference Label sheet on my desk to specify numbers correspanding I/O port (for example, 68 -- AI0+). I suspect if this SCB-68 Quick Reference Label sheet matches the terminal CB-68LP?
    I will talk to my coworkers next week.
    jason

  • How to Read a Message with Content Type multipart/alternative

    Hi ,
    I need to write a POP3 Client to read email message ..but some times the messages comes with content type multipart/alternative
    how to parse it and read only one of the content :
    for example :
    This is a multi-part message in MIME format.
    ------=_NextPart_000_12C25_01C6B64F.09226B00
    Content-Type: text/plain;
    charset="iso-8859-1"
    Content-Transfer-Encoding: 7bit
    Assignment to workgroup Name 1 : L2 SD Service Delivery Apps Spt
    Open CI Search Code : HPSD
    Description : tesat
    General Information :
    Is the workgroup owner Aware of the addition to Workgroup : Yes
    Workgroup to be added :
    L2 SD Service Delivery Apps Spt
    ------=_NextPart_000_12C25_01C6B64F.09226B00
    Content-Type: text/html;
    charset="iso-8859-1"
    Content-Transfer-Encoding: quoted-printable
    <br><P>Assignment to workgroup Name 1 : L2 SD Service Delivery Apps =
    Spt</P>
    <P>Open CI Search Code : HPSD</P>
    <P>Description : tesat</P>
    <P>General Information :</P>
    <P>Is the workgroup owner Aware of the addition to Workgroup : Yes</P>
    <P>Workgroup to be added :</P>
    <P>L2 SD Service Delivery Apps Spt</P>
    <P> </P>
    <P> </P>
    <P> </P>
    <P> </P>
    <P> </P>
    ------=_NextPart_000_12C25_01C6B64F.09226B00--
    The Same message is in text as well as HTML so not sure how to read it .
    currently my program is as follows
    for (int i = 0; i < found.length; i++) {
    Message m = found;
    // Get some headers
    Date date = m.getSentDate();
    Address [] from = m.getFrom();
    String subj = m.getSubject();
    String mimeType = m.getContentType();
    System.out.println(date + "\t" + from[0] + "\t" +
    subj + "\t" + mimeType);
    Object o = m.getContent();
    if (o instanceof String) {
    System.out.println("**This is a String Message**");
    System.out.println((String)o);
    } else if (o instanceof Multipart) {
    System.out.print("**This is a Multipart Message. ");
    Multipart mp = (Multipart)o;
    int count3 = mp.getCount();
    System.out.println("It has " + count3 +
    " BodyParts in it**");
    for (int j = 0; j < count3; j++) {
    // Part are numbered starting at 0
    BodyPart b = mp.getBodyPart(j);
    String mimeType2 = b.getContentType();
    System.out.println( "BodyPart " + (j + 1) +
    " is of MimeType " + mimeType);
    Object o2 = b.getContent();
    if (o2 instanceof String) {
    System.out.println("**This is a String BodyPart**");
    System.out.println((String)o2);
    } else if (o2 instanceof Multipart) {
    System.out.print(
    "**This BodyPart is a nested Multipart. ");
    Multipart mp2 = (Multipart)o2;
    int count2 = mp2.getCount();
    System.out.println("It has " + count2 +
    "further BodyParts in it**");
    } else if (o2 instanceof InputStream) {
    System.out.println(
    "**This is an InputStream BodyPart**");
    } //End of for
    } else if (o instanceof InputStream) {
    System.out.println("***********************************This is an InputStream message**");
    InputStream is = (InputStream)o;
    /* if(m.getContentType().equalsIgnoreCase("multipart/alternative")) {
    MimeMultipart mp = new MimeMultipart();
    // Assumes character content (not binary images)
    } else {*/
    BufferedReader reader
    =new BufferedReader(new InputStreamReader(is));
    String thisLine=reader.readLine();
    while (thisLine!=null) {
    System.out.println(thisLine);
    thisLine=reader.readLine();
    So when the Content TYpe is multipart/alternative it goes into InputStream message .
    any help and ideas to handel such situations ?
    Thanks
    San
    Message was edited by:
    sanrosh_95

    Try reposting that with tags (replace the {'s with ['s).
    Long story short, I think the FAQ and examples would go a long way towards explaining this, but you basically can check the content type, or check if the content contains parts, and parse each part separately.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Sysgen : How to read the input port data type, width and rate dynamically in a masked subsystem ?

    Hello everybody,
         I am designing a general purpose block in system generator. I pass the user parameters to the block through masking it. Some user parameters can change the block configuration. The input port data type, width and rate can also affect the block configuration.
         The problem is that these values (input port data type, width and rate) are subject to change. So I should read them dynamically, then change the block configuration through programming the "Initialization Commands" field. But unfortunately there is no straight way to read the input port information.
         There are some methods in for example the "Black Box". these are:
    input_width = this_block.port('din').width;
    input_rate = this_block.port('din').rate;
    But these methods are not applicable to a masked subsystem.
    I have tried other ways also. You can find them below. None of them worked.
    Does anybody know how can I solve this problem?
    Other ways I tried:
    1)
    design_name([],[],[],'compile')                                       
    q=get_param(gcb,'PortHandles');
    get_param(q.Inport,'CompiledPortDataType')
    get_param(q.Inport,'CompiledPortWidth')
    get_param(q.Inport,'CompiledPortDimensions')
    design_name([],[],[],'term')
    2)
    ssGetInputPortDataType
    3)
    ts = Simulink.Block.getSampleTimes([gcb '/Input'])
     

    Today we rely on Simulink to perform parameterization of your designs in two ways:
    Parameterizable Subsystems and Blocks : Parameters themselves can be MATLAB expressions that need to be evaluated for which we need the MATLAB interpreter
    The very useful Rate and Type propagation or Simulink compilation that allows us to specify types & rates in one location that gets systematically propagated to all.
    To truly make the HDL Netlist that is generated from SysGen parameterizable, we would have to implement some of this capability in the HDL netlist itself by:
    Using Generics(VHDL) or Parameters(Verilog) - We would have to capture the bit width(type) propagation through levels of hierarchies and finally parameterize the IP itself based on this value
    Since IP itself does not have this capability through generics, we would have to package a separate tcl script that updates the IP parameterization appropriately in response to top level parameters(or GUI parameters)
    Interpreting MATLAB expressions and translating them into VHDL/Verilog expressions (alternatively tcl expressions of IP). In simulink, mask parameters can be passed from one level to the next. Also parameterization of a block can be composed of Matlab expressions using variables from ancestor masks & the MATLAB interpreter – so we will need to somehow capture that as well.
     

  • How to read an IDoc with an ABAP program?

    Hi experts!
    I am new to SAP and I need to read an IDoc with an ABAP program... how to do it?
    Maybe it is possible to read an IDoc into inner table...?
    Hellpful answers and advices will be rawarded.
    Regards,
    Mindaugas.

    hi
    I understand your issue, to pickup an IDOC flat file & post it to R/3 (with or without mapping).
    There is no straight forward solution but there are some ways (Normal way of Working as of now ?!!!) provided in the "How to"
    check this link
    https://websmp101.sap-ag.de/nw-howtoguides
    and look for this guide
    How To Convert Between IDoc XML and Flat Files in XI.30
    Probably you need to automate this using some programs,
    - Create an ALE port of type File
    using transaction WE21 on your
    Integration Engine.
    - Run report RSEINB00 on your
    Integration Engine. The report will
    upload the file, filter the IDoc header
    data, perform the conversion to IDoc
    XML and put the data into the
    pipeline of the Integration Server.
    Therefore it is crucial, that the IDoc
    control record data is populated
    correctly and corresponds to the
    adapter-specific identifiers of your
    sender service. Once the message
    is put successfully into the pipeline
    of the Integration Server, the file is
    deleted.
    Hope this fixes your issue
    regards
    ravish
    <b>plz dont forget to reward points if helpful</b>

  • (Urgent) How to read file properties with virtual path?

    I have the data.properties file, and write a servlet file to read properties from this properties file. But I get a problem, that is: I CANNOT USE VIRTUAL PATH!
    How can I solve?
    My Application Directory is,
    WEB-INF
    classes
    loadProperties.class
    data.properties
    More Question,
    I can use Context in Web.xml to assign values to parameters. But its will be shown. How can I hide value with a properties file?

    This is not working.
    I am using Tomcat 4.0.6, for my JSP application I am trying to read ini.properties file from \webapps\myapp\WEB-INF\classes\common\
    directory through java bean.
    System.getProperty("user.dir")
    is giving <tomcat-home>\bin directory.
    unless I hard code the path this way, I could couldn't read the ini file.
    Properties props = new Properties();
    String strIniFilePath = <webappPath> + "\\WEB-INF\\Classes\\Offenders\\Common\\";
    props.load( new FileInputStream(strPropsFile));

  • PCI 6023E Analog Input with DAQmx

    Hello everybody,
    I have some problems with a PCI 6023E Card. I`m using Lab View 7.1 on Windows 2000.
    When i start the MAX (Devices and.../NI-DAQmx - Devices.../PCI-6023E) and try to open the "Testpanel"
    i get the following message:
    Lab View: An exeption occurred within the external code
    called by a Call Library Node. This might have corrupted
    Lab Views memory. Save any work to a new location and
    restart Lab View.
    VI "BlockatContainerState2.vi" was stopped at node
    0xA10 of Sub VI "DAQmx

    sorry i had a problem thats the rest of the message
    Sub VI "DAQmx Assistant_DAQmx Create AI Channel (sub).vi"
    i get the same message when i try to use the DAQmx Assistant for
    analog Input measurements in Lab View.
    I hope you can help me
    best regards
    Chris

Maybe you are looking for