Convert U16 to scaled data

Hello,
I'm using DAQmx Read  (Analog 2D U16 NChan NSamp) to read from USB 6009. However, i need to scale the voltage values and calculate the RMS values on each interation.
I must write it in I16. I've tried a lot of things but none worked!
Thanks
Attachments:
imagem.JPG ‏49 KB

You have a few problems, mostly stemming from not understanding some diagram structures:
You are passing the 2D array of integers into a for-loop that is wired to loop once. That's not much of a loop, now, is it?
Within the loop you're peeling off column zero (since the loop is only running once), and then multiplying the values by some constant. Not sure what that constant is, since its value is in case 0 of the case structure, which you don't show.
You're then creating a 2D array of this (not sure why), which you're feeding into a subVI that seems to have been written by you. Without seeing what this VI is doing, it's impossible to say if it's doing it right.
Given that, the question I have is: how many channels are you scanning? If I remember correctly, the DAQMX VI that you're usint spits out a 2D array of integers, with each column being a different channel. Are you scanning just one channel, and so only need one column? If so, you don't need a for-loop to get your samples. Just use an Index array to pull off the channel you need. If you're scanning multiple channels, you don't need a for loop at all. Just feed the 2D array into a multiply function. It's polymorphic:
Message Edited by smercurio_fc on 05-04-2007 09:05 AM
Attachments:
Example_BD.png ‏6 KB

Similar Messages

  • How can I convert from Modbus raw data to engineering units using a formula?

    Within Lookout, I have several Modbus numerical input types that do not have a linear corespondence to the Engineering values they represent.  How can I display these values accurately using a formula to convert from the raw data to an engineering value?

    I don't quite understand your reply.  I'm using Lookout 6.0.2, logged in as Administrator, in Edit Mode.  The Modbus object is named RTU06_SAV.  The Active member is 30002 with an alias of SAVfmSMT_RSL.
    Following your instructions, I opened Object Explorer and right-clicked on RTU06_SAV. 
    This opened a menu containing:  Refresh, Cut, Copy, Rename, Delete, Edit connections..., Edit Data Member Configuration, Configure Network Security and Properties.
    I assumed that I should select Edit Data Member Configuration, but maybe I'm wrong. 
    Within Data Member Configuration I can set up Linear Scaling between Raw data and Engineering data.  I know how to do that, but what I need to know is how to convert Raw data to Engineering data using a formula representing a non-linear transformation (such as a converion to a logarithmic value or perhaps a formula derived by fitting the formula to a curve on a calibration chart).
    Once I have this my Engineering data can be represented on a control panel as both a numeric value AND as a correctly reading Gauge.  It can also be properly represented on a HyperTrend graph.
    What do you suggest?

  • Convert Char. to Master Data

    Hello Experts,
    I have a char. in the system. And I would like to convert it to  master data. Because I am going to add to an attribute.
    What should I do?

    Hi ,
    1- Go to Transaction RSD1 and Enter the technical name of your Info Object and select the change option .
    2- go to Master Data/ Text Tab of Info object .
    3- Select the check box With Master Data and if you need text of master data then select the With Texts check box also .
    You can select short ,medium and long text as per your need .
    4- Now you can see that Attribute Tab has been appeared for the Info object . You can enter display or navigation attribute as per your requirement .
    Do not forget to re-activate the info object again .
    Note : If your object is already used in Info provider , system will not allow to make above changes . So First remove it from Info provider and then do this changes .
    Hope it helps .
    Regards
    Vikas Sharma
    Robert Bosch

  • Convert string to a date

    Gurus,
    It would be highly appreciable if you could help me in knowing how to convert a string to date in obiee. I know we need to use CAST function. I don't have enough material to figure it out myself.
    Awaiting a reply.
    Thanks.

    Nico - Thanks for the link, this is very helpful. Please tell me what's wrong in the following code. Am enlcosing the code and the error.
    Code 1 :
    CAST(CAST('31-OCT-'||CAST(YEAR("Dim - MBS Loan"."CLOSING DATE") AS CHAR) AS CHAR) AS DATE)
    Error 1:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 17001] Oracle Error code: 25137, message: ORA-25137: Data value out of range at OCI call OCIStmtExecute: select distinct D1.c1 as c1, D1.c2 as c2, D1.c3 as c3,
    Code 2 :
    CAST('31-OCT-'||SUBSTRING(CAST(YEAR("Dim - MBS Loan"."CLOSING DATE") AS CHAR),3,2) AS DATE)
    Error 2:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 17001] Oracle Error code: 1840, message: ORA-01840: input value not long enough for date format at OCI call OCIStmtExecute: select distinct D1.c1 as c1, D1.c2 as

  • How to convert from line chart data to CSV format

    Hi ,
    I am using Flex 3 and AS.
    I am getting data from MS SQL and display the data as line
    chart this is ok.
    But i want to convert this line chart data to CSV or .xsl
    format.I find one example in fourms the from data grid to CSV
    For this URL is
    http://www.abdulqabiz.com/blog/archives/flash_and_actionscript/datagriddataexporter.php
    But i want Line chart to CSV.Please help me.

    Line chart is a just a visual representation of some data
    that's sitting in your database. Isn't it? You load this in Flex,
    probably using HTTPService class, and pass it to some chart object.
    Now when use says that she needs it in CSV format, you're
    gonna have to send another request to the server to produce the
    same data, convert into CSV or XLS format and let user download it.
    Of course, if use doesn't want to download, you don't have to
    go to the server, at least for CSV format. You can convert the same
    data that used plot the chart to convert to CSV.
    Am I missing something here?
    ATTA

  • Problem in converting the String to Date with time zone GMT

    Hi,
    When I tried to convert the string 12/05/2009 to Date, the time zone is set to BST.On the other hand, for the date 12/12/2009, the time zone is set to GMT. What should I do to get the time zone as GMT all the time.?
    SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy");
    String dateString = "12/05/2009";
    System.out.println(myDate.toString());

    I think you are all missing the point. java.util.Date objects always alway always store the date as the number of milliseconds since 1/1/1970 UTC so the only TimeZone they have its the implicit UTC. When you use the Date.toString() method the toString() method gets the default time zone from your environment and formats the data accordingly. This means that the same Date object will, by default, produce a different result for France and Australia and the US.
    So, if you have the date "12/5/2009" as a String then to convert it to a java.util.Date you must specify what TimeZone is implied. If it is your system time zone then you can just create a SimpleDateFormat object with the correct format and then use the parse() method to create the java.util.Date object and this will automatically be converted to UTC. If the date String represents some other time zone then you must explicitly set the time zone of the SimpleDateFormat object before parsing the string.
    The same approach applies when converting a java.util.Date object to a String. If you want anything other than your system time zone then you must explicitly tell the SimpleDateFormat what time zone you want the result formatted for.

  • Scaling Data on report BPC 10.0

    Hi All,
    I would like to know if anyone had solve the problem on ScalingData. On our latest version (7.5) we had a drop-down list (€, K€, M€) which changed my entire report. In the new version I can't find a similar way, the ScalingData function doesn't allow you to perform it on the entire report.
    Is there a way to manage scaling data like the currency ?
    Thanks a lot.

    Hi,
    there is, but it is a bit hidden ....
    step 1: use the SCALING property in the account dimension to identify the accounts you want to scale (Y) versus those you do not want to scale (N). For example you probably would not want to scale number of employees etc.
    step 2: use the EPMSCALEDATA function in a report. The easiest way I have found to use this on the entire report is to use it via the formatting sheet.
    on the formatting sheet, go to the use cell, the example uses the default colum format
    double click and select & highlight content only
    select the override option on the right and enter your empscale data function
    confirm with the override button below.
    the formatting sheet should now look something like this
    cell c2 on the report sheet has the factor as a number such as 1, 1000, etc., cell d5 is the first column header and c6 the first row header. this is what the report for this example looks like
    As you can see, the empscaledata function has been inserted into every data cell of the report.
    Hope this helps.
    BR,
    Arnold

  • Error when converting time stamp in date time time zone CST  in IC

    Hi Experts,
    We have recently upgraded from CRM 5.0 to CRM 2007. We are using IC WEB Employee interaction center.
    so when agent create service ticket in interaction center and close the ticket on same day we are getting an error saying Error when converting time stamp in date time time zone CST.
    we thought there may be problem while installing SAP CRM by basis team in time zone, but we did not find any problem.
    So please advice how to resolve this issue.
    Regards,
    Teja

    Hi Teja,
    I saw a similar message, and it was resolved by adding a timezone to the user profile defaults tab in SU3. I believe the system has been configured to convert between users' timezone and the system timezone, therefore it needs to know each users' timezone.
    Regards,
    Simon.

  • Cannot convert from java.util.Date to java.sql.Date

    In the below code am trying to get the current date and 60 days prior date:
    Date  todayDate;
              Date  Sixtydaysprior;
              String DATE_FORMAT = "MM/dd/yy";
              DateFormat sdf = new SimpleDateFormat(DATE_FORMAT);
             Calendar cal = Calendar.getInstance();
              todayDate = sdf.parse(sdf.format(cal.getTime()));
              cal.add(Calendar.DATE, -60);
             Sixtydaysprior = sdf.parse(sdf.format(cal.getTime()));I have imported following files:
    <%@page
         import="java.util.Calendar,
                   java.text.SimpleDateFormat,
                   java.text.ParseException,
                            java.util.*"
    %>Shows up following error msg:
    Type mismatch: cannot convert from java.util.Date to java.sql.Date
    Thanks.
    Edited by: MiltonDetroja on May 22, 2009 11:03 AM

    Shows up following error msg:
    Type mismatch: cannot convert from java.util.Date to java.sql.Date
    I don't think this exception is thrown from the portion of code you have shown. As clearly specified in exception message, you cannot cast an instance of java.util.Date to java.sql.Date. you will need to do something like this
    java.util.Date today = new java.util.Date();
    long t = today.getTime();
    java.sql.Date dt = new java.sql.Date(t);

  • Smart forms convert to pdf binary data

    Dear All,
    I'm working on smart forms integrations with .net and  I need to send the smart forms PDF binary data though custom rfc .
    For that i'm  converting smart forms otf  data  to pdf in and pass this data  through rfc but this idata is is not wokring on .net guys when they are converting this on pdf..
    so is there any need of decoded smart forms otf data before passing through or i'm missing some basic step?
    Please guide me?
    Rg
    Anuj

    hi,
    Have a look on this wiki:
    [http://wiki.sdn.sap.com/wiki/display/Snippets/SmartformoutputtoPDFformat]
    And maybe this one could also interest you:
    [|http://wiki.sdn.sap.com/wiki/display/Snippets/SmartformtoMailasPDF+attachment]
    regards
    mickael

  • How to convert a string to date and then compare it with todays date???

    Hello.
    I want to set a format first for my dates
    DateFormate df = new SimpleDateFormate("yyyy-mm-dd");
    once this is done then I want to convert any string to date object in the above formate
    String str="2001-07-19";
    Date d = null;
    try{
    d = df.parse(s);
    }catch(ParseException pe) {
    pe.printStackTrace();
    First of all there is something wrong above,cus what I get for this is
    Fri Jan 19 00:07:00 MST 2001
    where as it should have been
    2001-07-19... to my understanding.
    once this part is done I need to get current date in the above set format and compare the
    current date and the date I set.
    I will appreciate the help.
    Thanks

    for the output part:
    a date is a point in time
    the output depends on the format you specify for output
    using for example a SimpleDateFormat.
    You only specified the format for parsing (which is independent for that of output) so java uses some default format ... see the DateFormat.format() method for details.
    for the comparison stuff, I just posted a little code snippet in this forum a few minutes ago.
    the hint is: Date.getTime() returns milliseconds after a fixed date
    hth Spieler

  • Convert varchar2 field into date formatted: DD-MON-YYYY

    Thanks in advance for anyone's help on this matter as I know it takes your time and expertise. I am pretty new to SQL but learning my way through it just have an issue with a text to date field conversion. It is an Oracle 10g database and I am writing in SQL. There is a field called Demand which is formatted in varchar2 format of ddmmyy. There is also a field that is formatted as a date called Payment which is formatted as DD-MON-YYYY.
    Essentially I need to do a simple Payment >= Demand, however as you can see that is some issue with that being a varchar2 field. Does anyone know if it is possible to do that type of expression against those two fields. Was thinking about possibly converting the varchar2 to a date but not sure how to get to that DD-MON-YYYY format.
    Also there are situations where this Demand field will often times be null as it would have never recieved any outbound correspondence in the past and would not have a date at all.
    Thanks
    Edited by: user10860766 on Aug 18, 2009 8:14 AM
    Edited by: user10860766 on Aug 18, 2009 8:19 AM

    Hi,
    It's hard to detect bad dates in pure SQL, especially if you need to be precise about when February 29 is valid.
    It's easy with a user-define function, like the one in [this thread|http://forums.oracle.com/forums/thread.jspa?messageID=3669932&#3669932].
    Edited by: Frank Kulash on Aug 18, 2009 3:50 PM
    To create a stand-alone function:
    CREATE OR REPLACE FUNCTION     to_dt
    (     in_txt          IN     VARCHAR2                    -- to be converted
    ,     in_fmt_txt     IN     VARCHAR2     DEFAULT     'DD-MON-YYYY'     -- optional format
    ,     in_err_dt     IN     DATE          DEFAULT     NULL
    RETURN DATE
    DETERMINISTIC
    AS
    BEGIN
         -- Try to convert in_txt to a DATE.  If it works, fine.
         RETURN     TO_DATE (in_txt, in_fmt_txt);
    EXCEPTION     -- If TO_DATE caused an error, then this is not a valid DATE: return in_err_dt
         WHEN OTHERS
         THEN
              RETURN in_err_dt;
    END     to_dt
    /To use it:
    SELECT  primary_key  -- and/or other columns to identify the row
    ,       demand
    FROM    table_x
    WHERE   demand          IS NOT NULL
    AND     to_dt ( demand
               , 'DDMMYY'
               )          IS NULL;

  • Excel converts numeric values to date

    Hi,
    I have a JSP page which is sending data to excel.
    response.setContentType("application/vnd.ms-excel");
    response.addHeader("Content-Disposition", "attachment;filename=\"a.xls\"");
    I am using codes above. But excel converts numeric values to date. for example I send "18.5" but excel convert it to "18.May". But when I add " " before the value there is no problem. But I dont want to use this
    how can I fix it. Thanks in advance.

    hi,
    the problem is not with your jsp encoding but with excel settings
    enter the mathe-statistics block in your excel program change setting from date to numbers
    that is all

  • Converting Excel or other data to J2ME database

    My freeware tool for converting Excel or other data to J2ME database
    http://translate.google.com/translate?hl=en&sl=ru&u=http://sss1024.googlepages.com/
    Could anybody help me in testing?

    This is Java application. Run on Windows, Mac and Unix
    PS
    site moved to http://microforms.mobile-mir.com

  • How to convert Flat file(.txt) data to an Idoc format(ORDERS05)

    Hi,
    How to convert Flat file(.txt) data to an Idoc format(ORDERS05). If any FM does the same work please let me know.
    thanks in advance,
    Chand
    Moderator message : Duplicate post locked. Read forum rules before posting.
    Edited by: Vinod Kumar on Jul 26, 2011 11:11 AM

    Hi,
            For more information, please check this link.
    http://sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a
    Have a look at the FM IDOC_XML_FROM_FILE. May be it helps...
    Regards

Maybe you are looking for

  • Need help in writing data to a flat file in .csv format

    Hi All, could you please show with a sample example to write data in .csv format using UTL_file. The result of the refcursor i want to write to a file in .csv format. How can i achieve this. Thx

  • Has anyone worked out how to fix screen flicker on MBP late 2010 running snow leopard?

    Hey, I have a MBP late 2010 (MacBookPro6,2) running Snow Leopard 10.6.8 and I'm having trouble with external screens. They work fine 70% percent of the time but the rest of the time there is intermittent flickering. This I have determined is a someth

  • After an automatic update my files are gone. How do I get them back?

    after an automatic update my files are gone. How do I get them back? Working on a Mac Book Pro OS 10.7.3 Missing files: pictures, photos, documents (written files) All in the map documents; aliases on the desktop The desktop was rebuild too, not the

  • How to use Programmable resistance 2720

    Hello, I am using and programming with PXI-2720. Could I set the resistance value in CVI program? I put the niswitch.fp in my project.   Do I need to control all relays for making 30ohm( example value) at my program? Could you help me if you have any

  • In my Finder window the Shared Section is missing

    Mac Pro 2007 Processor  2 x 3 GHz Dual-Core Intel Xeon Memory  6 GB 667 MHz DDR2 FB-DIMM Mac Lion OS X 10.7.5 In my Finder window the Shared Section is missing. Its even checked under Finder>Preferences>Sidebar. Do I need to edit something in my Libr