How to convert timing to floating number

hi everyone, i want to do a time measurement of hall sensor and use this value to set a frequency and also to use as process value in a PID controller. the problem is that i get an dynamic data output and i'd like to have this in a floating number, is this possible? or another way is also good... hereby a jpeg to make it more clear.
i also get more problems with this, when i change the throttle (0-100%) is doesn't do anything and my while loop also doesn't end anymore. this is just a small part of the complete program, maybe it's to heavy for my comp? (single core 1,6Ghz, 1,5gig ram) 
hope it's a little bit clear what i mean
thanks in advance ! 
P.S: i know that the divide by one is useless because you can directly measure the frequency, this has allready changed.
       the program is meant to drive a PMSM motor 
Solved!
Go to Solution.

hi thanks for the reply, the answer you gave helped me out.
now i've noticed that when i ad the the pid loop (even when nothing of it is connected) the program doesn't respond anymore. is this because of my computer? the while loops (both the normal and pid loop) are stopped by a single switch...
i have uploaded my VI so maybe someone could check it out, be aware it's totally not finished ^^. if you delete the pid control you'll see what i mean.
thanks in advance 
Attachments:
PMSM steering.vi ‏2527 KB

Similar Messages

  • Looking for VI where i can convert covert a float number to Q 11.5 representation

    looking for VI where i can convert covert a float number to Q 11.5 representation and what exactly  Q 11.5 representation means.
    Kindly help me on the same.
    Solved!
    Go to Solution.

    Appears to be right, but don't forget to round to the nearest integer.
    http://zone.ni.com/reference/en-XX/help/371361H-01/glang/round_to_nearest/
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness

  • Converting string to float number

    Here's what I'm trying to do. The user types a number, such as 12.011, in an input box. I want to check to see if the number they typed is between two numbers, such as 12 and 12.1. Therefore, I want to convert the string in the input box to a float number, not an integer, so I can check to see if it's in the correct range. How do I convert a string into a float number?
    thanks
    Mark

    Did you try:
    Number(textinput1.text);
    if(Number(textinput1.text)>12 && Number(textinput1.text)<12.1)

  • How to convert from Datetime to number?

    chg_date_time
    40265.492
    SELECT c.chg_date_time, TO_DATE('01011900','DDMMYYYY')+CHG_DATE_TIME FROM CHNGHIST C
    After execute:
    30/03/2010 11:48:29
    In the above query, we convert number to datetime.
    Now I want to convert from Datetime to number.
    i.e., 30/03/2010 11:48:29 = ? (40265.492)
    Thanks
    Nihar

    Hello,
    This would do it :SQL> select to_date('30/03/2010 11:48:29','dd/mm/yyyy hh24:mi:ss') - TO_DATE('01011900','DDMMYYYY') nmbr from dual;
          NMBR
    40265,492
    1 row selected.

  • How to convert exponential data into number for the downloaded excelsheet

    Hi
    I have downloaded one field data i.e. having char of 50,  into excel sheet and it is displaying as  exponential in the excel sheet. 
    The data numbers should display as text only i.e 1236547896321 and not exponential
    Is anyone can tell how we can do this
    Thanks
    Pallavi

    Hello Pallvai,
    The problem of exponential is with the excel. Excel converts the large numbet into exponential.
    To avoid this you can make the number into text then excel won't convert it into exponential.
    For that you can do a simple trick. Just prefix a single quote ( ' ) in the field.
    eg:
    field = 1236547896321.
    then,
    constants c_quote type c value '''.   "<-- single quote
    concatenate c_quote field into field.
    " This will make the EXCEL to consider this field as text not number and hence it will not be considered
    " as exponential.
    Hope this solves your problem.
    Regards,
    Sachinkumar Mehta

  • How to convert waveform into complex number

    Hi,
    I need to convert the acquired voltage and current waveform through DAQ card into complex numbers in order to find the phase relationship
    between the waveform.Can u tell me is there any method to convert the acquired waveform into complex number array
    or is there any other method to find the phase??
    please help me in this
    Regards
    Meenatchi

    Dear Meenatchi,
    I am attaching two sample VI s for the issue you are facing. Hope this helps.
    The waveform in array format.vi gives you the values of the waveform obtained from your DAQ card in an array directly. You can choose this mode by selecting it from the options available on the DAQmx read vi. But if you still want to extract the array from the waveform data type please navigate to programming >> waveform >> get waveform components and extract the array component.
    The phase of the complex number created.vi gives you and array of the phases. Please specify the number of iterations of the for loop that determines the size of the array.
    If you need any further assistance, please feel free to contact us.
    Regards,
    Pavan Ramesh
    Applications Engineer
    NI India
    Attachments:
    Waveform array issue.zip ‏10 KB

  • How to convert days to years, months and remaining days

    Hi All,
    I have the number of days for example : 398 days how to
    convert 398 days to number of years and number of months and remaining days
    like 398 days 1 year , 1 month and 2 days
    Regards
    rkrao

    e.g.
    SQL> select sysdate, sysdate - 1234 from dual
      2  /
    SYSDATE   SYSDATE-1
    09-AUG-06 24-MAR-03
    SQL> select trunc(trunc(months_between (sysdate, sysdate - 1234))/12) yrs,
      2  mod(trunc(months_between(sysdate, sysdate - 1234)), 12) mnths,
      3  sysdate - add_months((sysdate - 1234), trunc(months_between(sysdate, sysdate - 1234))) dys
      4  from dual
      5  /
           YRS      MNTHS        DYS
             3          4         16
    SQL>

  • Float number

    Hi,
    I want to display the float number, when i use the numeric indicator, it only display the interger. how can i find the float number.
    thanks
    Attachments:
    ex1.jpg ‏961 KB

    Right click on the control or terminal, then select "Representation..."
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

  • How to convert inode number to path (for Eudora to Mail conversion)

    I've seen a header line in my Eudora client that has what I believe to be an inode number in it that represents a path:
    X-Attachments: :Server:622049:style.css:
    Server is the volume name and the 622049 appears to be the inode file system path to the folder containing the file. I want to find a programmatic way to do the conversion. For example, if in the Terminal, I issue this:
    sudo find / -inum 622049 -print
    Leopard does find the path:
    /Users/trevor/Documents/Style Sheets
    but also a whole lot of other guff such as:
    find: /dev/fd/4: Not a directory
    find: /net/localhost: Operation timed out
    The reason is that I want to do a really clean move from Eudora to Mail, but I can't any application that works well AND converts outgoing attachment paths for Mail to use. The best application application I could find does not (yet) know how to translate the inode number to a path, so that the resulting messages in Mail have the correct OUTgoing message attachments (it converts incoming attachments just fine). Hence, it's in my interest (and possibly that of all others who want a complete conversion to Mail from Eudora) to do what I can to get the Eudora to Mail process convert BOTH incoming and outgoing attachments (which, to the best of my knowledge and search, no conversion tool can do at the moment).
    Surely there is a direct, programmatic method (presumably the method used by Eudora) to get the path information. I want to send that method to the developer of the best tool I found.
    Anyone know where I can find a reference to how to prgrammatically translate the inode number to the full path, so that the e-mail converter can grab the file quickly?
    Thanks.

    Hi, Christian:
    Thank you for your message!
    i used the type cast, but it seems VISA write can not recognize it, what is the problem?

  • How to convert number datatype to raw datatype for use in data warehouse?

    I am picking up the work of another grad student who assembled the initial data for a data warehouse, mapped out a dimensional dw and then created then initial fact and dimension tables. I am using oracle enterprise 11gR2. The student was new to oracle and used datatypes of NUMBER (without a length - defaulting to number(38) for dimension keys. The dw has 1 fact table and about 20 dimension tables at this point.
    Before refining the dw further, I have to translate all these dimension tables and convert all columns of Number and Number(n) (where n=1-38) to raw datatype with a length. The goal is to compact the size of the dw database significantly. With only a few exceptions every number column is a dimension key or attribute.
    The entire dw db is now sitting in a datapump dmp file. this has to be imported to the db instance and then somehow converted so all occurrences of a number datatype into raw datatypes. BTW, there are other datatypes present such as varchar2 and date.
    I discovered that datapump cannot convert number to raw in an import or export, so the instance tables once loaded using impdp will be the starting point.
    I found there is a utl_raw package delivered with oracle to facilitate using the raw datatype. This has a numbertoraw function. Never used it and am unsure how to incorporate this in the table conversions. I also hope to use OWB capabilities at some point but I have never used it and only know that it has a lot of analytical capabilities. As a preliminary step I have done partial imports and determined the max length of every number column so I can alter the present schema number columns tp be an apporpriate max length for each column in each table.
    Right now I am not sure what the next step is. Any suggestions for the data conversion steps would be appreciated.

    Hi there,
    The post about "Convert Numbers" might help in your case. You might also interested in "Anydata cast" or transformations.
    Thanks,

  • How to convert workflow template number into transation code?

    Hi Experts,
    We are using WS20000081 Leave request workflow in SAP 4.7.I created one customized workflow according to the client requirement.How can i convert WS99900009 into Transaction?
    I created one absence type with workflow template WS99900009.While applying a leave it is showing the erroe as "WS99900009 is unknown" .
    Please help me to resolve this problem.
    Thanks,
    Hemalatha

    Hi Arun
    WS20000081  and WS04200009 are triggering  when i applied a leave.But i need to add some amore task in that.For that i created the Customized workflow.Then we tried to create Rule groups with custom workflow id number in ESS settiongs.It was saying that ws99900009 is unknown.And we tried to replace the WS20000081 by ws99900009.It was alos saying that ws99900009 transaction is unknown.
    So pls guide me how to convert ws99900009 into transaction?
    Thanks in advance
    Regards,
    Hemalatha

  • Essbase 9.3 Calc scripts. Pb with dates. How to convert (string = number) ?

    Hello,
    I've a problem with Essbase(Planning?) Scripts on version 9.3. It looks simple but I do not find any (clean) solution :
    On my Essbase database, I have a member called "Reference_Date" on my axis Indicators. It is a date data type, that is to say, it displays a number corresponding to a YYYYMMDD format. For example : 20091029 for October 29th 2009.
    In calc scripts I often need to compare the month included in that "Reference_Date" with the current Member of my Time Axis (I have 12 Months members based on the format M02 for February for example). The final aim is to calculate a number of complete years since that "Reference_Date".
    But theses two elements are not of the same "type" (one is a number value and the other is a "member" in Time Axis). So I'm forced to convert one of this two elements in order to compare it.
    For example I can extract the month value of the "Reference_Date"' and put an "M" before it to have a Time member equivalent or I can convert the member Name M10 to a number (10))
    in both cases I have the same type problem : I don't know how to convert a string into a number nor how to convert a number into a string.
    (For example @CONCATENATE doesn't work with numbers). and that my only remaining problem.
    I didn't find any Essbase Function which do this (conversion number <=>string).
    Is anyone have an Idea ?
    Thanks for your help
    Best regards

    I don't know any way for you to compare your data against your metadata. Not directly. To me it makes little enough sense to try that I'm not surprised the developers didn't provide for it.
    I've converted member names to strings, manipulated the strings (calc script functions are not good at this), and turned them back into member names, but that's really the only use I've had for string manipulation. I don't think an equivalency operator even exists for string data. And I see no way to begin thinking of a member name, once converted to a string, as a number.
    It makes even less sense to me to try thinking of a data value as a string. Even text values in Sys 11 are stored as numbers. Not encoded characters, but just a number to look up somewhere.
    I think you can do what you want though, with something like this...
    IF (@ISMBR("FY08"))
    vYr = 2008;
    ELSEIF (@ISMBR("FY09"))
    vYr = 2009;
    ENDIF;
    IF (@ISMBR("M01"))
    vMth = 1;
    ELSEIF (@ISMBR("M02"))
    vMth = = 2;
    ENDIF;
    "Years_Since_Reference" = ((vYr * 100) + Mth) - ("Reference_Date" / 12);
    Obviously, the math will need some work, coz that doesn't actually work, but the logic above essentially turns your metadata into numbers, which is what you are after.
    Good luck,
    -- Joe

  • How to convert an int variable into Number

    Hi all,
    I am using Jdeveloper 11.1.1.2
    When I insert a row in a entity object I want to create another row in another entity object, but when I am setting the attribute for the new row I have a problem.
    Here is the code:
    int a = EO1Impl.paramA;
    NameEO2Impl.setAttribute("Attribute1", a);
    The error is that variable a is an int, while Attribute1 is a Number.
    How can convert an int to a Number.
    Thank you.

    Andrea9,
    If a, as you say is an int, and assuming you mean an oracle.jbo.domain.Number,
    NameEO2Impl.setAttribute("Attribute1", new oracle.jbo.domain.Number(a));works just fine.
    John

  • How to convert raw to number in oracle 8

    Does anyone know how to convert a raw data to number format ???
    If i do: select dump(50,16) from dual, it will return bytes c1 33.
    With this bytes in a raw variable, how can i convert it to a number variable in Oracle 8.
    PS: Oracle 8 doesn't have utl_raw.cast_to_number function...
    Thanx.

    Thanx for help... But...
    This examples are very usefull, but only converts a value in HEX to number.
    In my case, i need a routine that convert the bytes of value 50 (i.e. 2 bytes -> C1 33) into a number variable. If i only use hex to number, will return wrong value. I need to convert this bytes (C1 33) into original number, i mean, value 50.
    Using dump function for 50, will return C1 33...
    How can i make to convert C1 33 back to value 50??
    I think that is the same of the utl_raw.cast_to_number, but i'm using Oracle 8, and this function is in Oracle 9...
    Anyone have idea ??

  • Help with how to convert a string to a number ??

    Hi All,
    I am having problem converting a string to number.
    Looks like my to_number function is not working.
    Help is very much appreciated.
    My query is below, and I know my problem is in my inner query.
    I am getting the following error:
    what am I doing wrong ? and how should I fix it.
    If there is a better approach, please share it.
    ORA-01722: invalid number
    01722. 00000 -  "invalid number"
    *Cause:   
    *Action:
    SELECT
        A.OBJECT_NAME,
        A.TIMESTAMP,
        A.SESSION_ID,
        A.REQUISITION_ID,
        TO_DATE(CUT(RR_PACE_FUNCTIONS.NAME(A.REQUISITION_ID),3,'.'),'YYYYMMDD') CSD,
        SUBSTR(SUBSTR(RR_PACE_FUNCTIONS.DESCRIPTION(A.REQUISITION_ID),9),1,30) COURSE_ID,
        A.WEEK_GROUP,
        A.APTITUDE_AREA,
        SUM(NVL(GTEP_ASGN,0)) GTEP_ASGN,
        SUM(NVL(AI_ASGN,0)) AI_ASGN,
        SUM(NVL(GTEP_ASGN,0) + NVL(AI_ASGN,0) ) BMT_ASGN
      FROM
        (SELECT OBJECT_NAME,
          SESSION_ID,
          TIMESTAMP,
          TO_NUMBER(FIELD1) REQUISITION_ID,  -- I believe here is the problem
          TO_NUMBER(FIELD2) WEEK_GROUP,     -- here as well
          SUBSTR(FIELD3,1,80) APTITUDE_AREA,
          TO_NUMBER(FIELD4) GTEP_ASGN,  -- here
          TO_NUMBER(FIELD5) AI_ASGN      -- here
        FROM RR_REPORT_QUEUES
        ) A
      GROUP BY OBJECT_NAME,
        TIMESTAMP,
        SESSION_ID,
        WEEK_GROUP,
        APTITUDE_AREA,
        REQUISITION_ID ;Many Thanks,

    Are you sure Field1, Field2, Field4 and Field5 contain a number information in all rows?
    If there is a non numeric String in your Field<x> columns in any row the error will occor.

Maybe you are looking for

  • Need to format a number

    I'm working on a web app for a department in my company and one of the fields is an account number that is stored as a numeric type in our database. The department who uses it insists that it should have a leading zero in the number. The account shou

  • ADF - Component File Download Listener - Setting the output filename

    Studio Edition Version 11.1.1.2.0 Hi, I would like to learn how to set the output filename as current data + filename. I have a button with the component File Download Listener that has theses parameters Content/Type: application/pdf Filename: test.p

  • How to use texting on ipad mini?

    I just got my new ipad for Xmas I was wondering how to use the texting on the ipad mini

  • When uploading photos, the size is halved

    I use pro photo websites for selling photos, but when I upload photos recently the size of these photo is halved. This is not accepted by these sites, they want max size.  Aperture settings for Web export are Jpeg, image quality 12 web thumbnails/web

  • When I open Firefox, a new tab also automatically opens.

    ''locking this thread as duplicate, please continue at [https://support.mozilla.org/en-US/questions/984119 /questions/984119]'' I saw a suggestion to replace all 'pipes' in my homepage url with the escape code "%7C", but there are no pipes in the add