How to write a function block?

Hello

Someone knows how to write a function block with LabVIEW?  Something like those in real time live > function blocks >.

Thank you very much in advance?

Assuming you are referring to these specifically...

http://www.NI.com/white-paper/7339/en/

.. then the answer is that it is almost impossible to make a new. However, there is really nothing special all that to their topic. They are essentially normal subVIs (which you can learn about the other links) which just happened to have some terminals connected to shared variables. I personally would not normally recommend that anyway. If you could clarify what exactly you are trying to do, it might be possible to give more specific advice.

Tags: NI Software

Similar Questions

  • How to write a function to estimate the number of rows returned SQL?

    How to write a function to estimate the number of rows returned SQL through SQL Execution Plan?
    My idea is
    Call dbms_sql.parse to create the SQL PLAN, then ask the PLAN for the number of estimated return lines.
    But how to get SQL plan through "id cursor?
    Thank you.

    You can use EXECUTE IMMEDIATE to explain plan statement. About the STATEMENT_ID generation, it could be anything. Even a SYSTIMESTAMP cast as TANK would work.

  • How to write a function (for an ex-Flash-dev)

    Hiya,

    I am coming from a Flash/AS 3.0 environment and I'm getting a bit confused trying to write functions in EA.

    I'm quite new to JS and jQuery so that something is similar to actionscript, I'm still finding things a little confusing.

    I'm working on my first project with EA 2014.1.1 and managed to get away with the built in functions to date, but I now need to do something more custom.

    For example, in Flash, I would write a function to a button and it would go in the first frame of the timeline or a class file:

    function nameOfFunction (event) {}

    do things

    };

    Then the button, we would have a script event listener calling the function:

    myButton.addEventListener (MouseEvent.CLICK, nameOfFunction);

    Can someone explain to me how it works in the EA?

    It seems easy to use for the very basic functions, but anything more requires advanced js knowledge!

    I watched a lot of tutorials but they are for older versions of the edge or that they cover only the basic stuff.

    It doesn't seem to be much out there at all.

    Thank you very much

    Hello

    Put the function in the compositionReady

    SYM. Nomfonction = function() {}

    Do all that in the service

    }

    and call it when you want it

    SYM. Nomfonction();

    I hope this helps.

  • How to write the function for bottom of logic...

    I have a picture in the picture I have a records like below
    code value
    1 20
    2 null
    3 30
    4 null
    5 40
    6 null


    The output need to have the values displayed in the fields first, followed by the NULL values as below

    code value
    1 20
    2 30
    3 40
    4 null
    5 null
    6 null

    I think the suspicion is that the values must be concatenated with the replacement of NULL values with (;).
    as
    20, 30, 40
    Get single values and insert into the table...

    for this I don't know how to write function for who can please help me on these...

    Published by: Claudia on June 22, 2011 22:45

    Published by: Claudia on June 22, 2011 22:51

    Create or replace function test_fun
    is
    cursor fun1 is the value select from table by CSA 2;-"this select query will return 20,30,40, null, null, null".
    v_out varchar2 (20);
    Start
    fun1 open cursor;
    loop
    extract the fun1 in v_out;
    dbms_output.put_line (v_out); - this is the command display output on the screen.
    output when fun1 not found %;
    end loop;
    close;
    end;

    Please try it and tell us if no query...

    Thank you
    IQ

  • How to write Save function based on the drop-down list box selection data in app mxml flex4 with as3

    Hi all

    I'm working on the application web flex4 with as3.

    I have a doubt, I've created a mxml it has two text boxes, except the button and a combo box that is has two option as a percentage and the amount.

    my needs are I gave here.

    need 1: when I choose option amount that two text boxes does not have to be editable.when I select text tat box two percentage option will be editable.

    need 2: when I select the percentage in combox option and two text boxes are empty, and then click the button Save-> I want to display warning msg

    need 3: when I select the option amount combox and the two boxes are emptu click the button Save-> I don't want any warning messages.

    How to validate it and how to write backup for this function.

    This is my sample code:

    list box ID = baseAmtPer

    ID TextBox1 = maxCommAmt.text

    ID = baseAmtPer.text text box

    If (((baseAmtPer.editable!=true) & & (maxCommAmt.editable! = true)) & & ((baseAmtPer.text=="") & &(ma xCommAmt.text=="")) |) (baseAmtPer.text == "") | (maxCommAmt.Text=="")) -> This condition not allowing while I'm selecing amount in combo box. How the TWO TEXT BOX WILL BE EMPTY for this problem

    {

    Alert.Show ("enter in all areas", "Information");

    }

    on the other

    {

    some encodings

    }

    Hello

    Please go through the following Code:

    http://ns.Adobe.com/MXML/2009.

    xmlns:s = "library://ns.adobe.com/flex/spark".

    xmlns:MX = "library://ns.adobe.com/flex/mx" minWidth = "955" = "600" minHeight >

    Import mx.collections.ArrayCollection;

    Import mx.controls.Alert;

    Import spark.events.IndexChangeEvent;

    protected function button1_clickHandler(event:MouseEvent):void

    {

    If (comboBox.selectedItem == "Percentage" & textBox1.text == "" & textBox2.text == "") {}

    Alert.Show ("enter the values");

    }

    }

    protected function comboBox_changeHandler(event:IndexChangeEvent):void

    {

    {if(ComboBox.SelectedItem=="Amount")}

    textBox1.editable = false;

    textBox2.editable = false;

    }

    else {if(comboBox.selectedItem=="Percentage")

    textBox1.editable = true;

    textBox2.editable = true;

    }

    }

    ]]>

    Amount

    Percentage

    Thank you and best regards,

    ------------------------------------------------------------------------------------------ --

    Vibhuti Gosavi . [email protected] | www.infocepts.com

    ------------------------------------------------------------------------------------------ --

  • How to write the function or procedure to function 'Round' in oracle

    Hello friends,

    Last week I went to attend the interview. I asked a function, or a procedure to achieve the functionality of the 'Round' function in oracle manually. I couldn't reach it properly. Can someone let me know how I can do this? Is a mathematical idea behind it?

    Thank you and best regards,
    SB

    Hello

    create or replace
    function my_round_fn (p_number in number, number of Round_Val)
    Return number
    is
    whole v_round;
    Start
    v_round: = P_number * Power (10, Round_Val);
    Return v_round / (Power (10, Round_Val));
    end my_round_fn;

    It works in all cases.

    Kind regards
    Praveen

  • How to write global functions?

    Hello

    I have some features in my application that I feel will be used in several places. Usually in HTML/Javascript that I could do:

    < script type = "Javascript" src = "js/functions.js" > < / script >

    In the functions.js file I could have various functions and call them from any page of the display.

    How can I get a set of functions like this in Flex/ActionScript? For example, I have a few places where a user may "Add an employee" for example. I would like to call the same function.

    How can I include some functions in the world so they can be called from anywhere in my application.

    -Westside

    I create a class and simply import the classes than any place you want to use. For utilities, you can create a class with static methods.

  • How to write a decryption function?

    Hi! everyone ,


    I see one encryption function in my database.


    Select f_pwd_encrypt ('password') of double


    -> 12412913141313139139130121


    My question is


    How to write a decryption function?


    As:


    Select f_pwd_decrypt ('12412913141313139139130121') of double


    ->password

    CREATE OR REPLACE FUNCTION EPADM."F_PWD_ENCRYPT" ( vpwd in varchar2)
    return varchar2
    is
        vother_p   varchar2(9);
        vtr_pwd  varchar2(2048);
        i       number;
        j         number;
        vsubstr varchar2(9);
        vtemp1 varchar2(08);
        vvalue number := 0;
        vdb_pwd varchar2(100);
    
    
        function str_2_bit(vstring in varchar2)
        return varchar2
        is
           i number;
           vtemp number;
           v1 varchar(2048);
    
    
         function single_byte(vin in number)
           return varchar2
           is
             i number;
             vresult varchar2(08);
             vtemp number := vin;
           begin
             for i in 1..8 loop
               vresult := to_char(mod(vtemp,2))||vresult;
               vtemp := trunc(vtemp/2);
             end loop;
             return(vresult);
           end;
      --
        begin
          for i in 1..lengthb(vstring) loop
            select to_number(substrb(dump( vstring ,10,i,1),instr(dump( vstring ,10,i,1),' ',-1)+1))
              into vtemp
            from dual;
            v1 := v1 || single_byte(vtemp);
          end loop;
    
    
          return(v1);
        end;
    
    
    begin
      vtr_pwd := str_2_bit(vpwd);
      vtr_pwd := substrb(vtr_pwd,4)||substrb(vtr_pwd,1,3);
      vvalue := 0;
      vdb_pwd := null;
    
    
       for i in  1..(lengthb(vtr_pwd)/4)  loop
         vtemp1 := substrb(vtr_pwd,(i-1)*4+1,4);
         for j in 1..4 loop
           vvalue :=  vvalue + to_number(substrb(vtemp1,j,1)) * power(2,j-1);
           dbms_output.put_line(j||' '||vvalue);
         end loop;
              vdb_pwd := to_char(vvalue) ||vdb_pwd;
              vvalue := 0;
       end loop;
      return(vdb_pwd);
    
    
    END;
    /
    

    OK, after reviewing the, I don't think you'll be able to write a function of decryption for him.

    The first thing he does is take the ascii value of each character in the password and converts them into a binary string.  The code it uses is far too complex and can be simplified, but which is not a problem here.

    I've recreated the first step of SQL like this...

    SQL > ed

    A written file afiedt.buf

    1 with chr_val like)

    2. Select level l

    3, dump('password',10,level,1) in the dmp

    4, to_number (substrb (dump('password',10,level,1), instr (dump('password',10,level,1),' ', 1) + 1)) as chr_val

    5, ascii (substr('password',level,1)) as chr_val - equivalent of extraction of useless dump

    6 double

    7. connect by level<=>

    8        )

    9, r (l, b, ch, chr_val, result, vtemp) as

    10 (select l, 0 b, chr (chr_val), chr_val)

    11, cast (null as varchar2 (8)) as a result

    12, chr_val as vtemp

    13 of chr_val

    14 union of all the

    15 select l, b + 1, b, ch, chr_val

    16, to_char (mod(vtemp,2)) | result as a result

    17, trunc(vtemp/2) as vtemp

    18 r

    where the 19 b + 1<=>

    (20) depth search first by l, defined b seq

    21, as)

    22 select l, ch, chr_val, str_to_bit result

    23 r

    where the 24 b = 8

    25 arrested by l, seq

    26            )

    27 select listagg (ch) within the Group (order) as password

    28, listagg (chr_val, ',') within the Group (order) byte_vals

    29, listagg (str_to_bit) within the Group (order) bit_vals

    30 sec.

    SQL > /.

    PASSWORD BYTE_VALS BIT_VALS

    --------------- ---------------------------------------- ----------------------------------------------------------------------------------------------------

    password 0111000001100001011100110111001101110111011011110111001001100100 112,97,115,115,119,111,114,100

    Then he takes this string binary ("bit_vals" in my example) and does the following:

    1. take the first 3 bits of left and to transpose on the right end of the string.

    2 chops the resultant bit string upward into sections of 4 bits (which is known as a 'nibble' inside)

    3. for each bit in the nibble, he treats the bits in binary reverse to normal and gives them a value of 1,2,4 or 8 from left to right for each bit set to 1

    4. for each nibble it adds the value of 1,2,4,8 bits to give a value from 0 to 15

    To show that the use SQL...

    SQL > byte (select ' 0111000001100001011100110111001101110111011011110111001001100100' as pieces of double)

    2, swap3bit as (-take the binary string and put the first bits (high) 3 as a (low) bit of the right hand side)

    3. Select bytes.bits

    4, substr (bit 4) | substr (bits, 1, 3) as init_substr

    5 bytes

    6                   )

    7, split4 as (-chop the string of bits nibbles (half bytes - 4 bits))

    8. Select level l

    9, substr (init_substr, ((level-1) * 4) + 1, 4) as a nibble

    swap3bit 10

    11. connect by level<=>

    12                 )

    13, bitpowers (select l

    14, snack

    15, to_number (substr(nibble,1,1)) * power (2, 1-1) as bitval1

    16, to_number (substr(nibble,2,1)) * power (2, 2-1) as bitval2

    17, to_number (substr(nibble,3,1)) * power (2, 3-1) as bitval3

    18, to_number (substr(nibble,4,1)) * power (2, 4-1) as bitval4

    19, to_number (substr(nibble,1,1)) * power (2, 1-1) +.

    20 to_number (substr (nibble, 2, 1)) * power (2, 2-1) +.

    21 to_number (substr (nibble, 3, 1)) * power (2, 3-1) +.

    22 to_number (substr (nibble, 4, 1)) * power (2, 4-1) as total_val

    23 of split4

    24                   )

    25 select * from bitpowers

    26.

    L NIBB BITVAL1 BITVAL2 BITVAL3 BITVAL4 TOTAL_VAL

    ---------- ---- ---------- ---------- ---------- ---------- ----------

    1 1000          1          0          0          0          1

    2 0011          0          0          4          8         12

    3 0000          0          0          0          0          0

    4 1011          1          0          4          8         13

    5 1001          1          0          0          8          9

    6 1011          1          0          4          8         13

    7 1001          1          0          0          8          9

    8 1011          1          0          4          8         13

    9 1011          1          0          4          8         13

    10 1011          1          0          4          8         13

    11 0111          0          2          4          8         14

    12 1011          1          0          4          8         13

    13 1001          1          0          0          8          9

    14 0011          0          0          4          8         12

    15 0010          0          0          4          0          4

    16 0011          0          0          4          8         12

    16 selected lines.

    These final values are then re-combination as strings in reverse order so that you get then:

    '12' |' 4'||' 12' |' 9'||' 13'... and so on.

    In SQL...

    SQL > byte (select ' 0111000001100001011100110111001101110111011011110111001001100100' as pieces of double)

    2, swap3bit as (-take the binary string and put the first bits (high) 3 as a (low) bit of the right hand side)

    3. Select bytes.bits

    4, substr (bit 4) | substr (bits, 1, 3) as init_substr

    5 bytes

    6                   )

    7, split4 as (-chop the string of bits nibbles (half bytes - 4 bits))

    8. Select level l

    9, substr (init_substr, ((level-1) * 4) + 1, 4) as a nibble

    swap3bit 10

    11. connect by level<=>

    12                 )

    13, bitpowers (select l

    14, snack

    15, to_number (substr(nibble,1,1)) * power (2, 1-1) as bitval1

    16, to_number (substr(nibble,2,1)) * power (2, 2-1) as bitval2

    17, to_number (substr(nibble,3,1)) * power (2, 3-1) as bitval3

    18, to_number (substr(nibble,4,1)) * power (2, 4-1) as bitval4

    19, to_number (substr(nibble,1,1)) * power (2, 1-1) +.

    20 to_number (substr (nibble, 2, 1)) * power (2, 2-1) +.

    21 to_number (substr (nibble, 3, 1)) * power (2, 3-1) +.

    22 to_number (substr (nibble, 4, 1)) * power (2, 4-1) as total_val

    23 of split4

    24                   )

    25 select listagg (to_char (total_val)) the Group (order of the desc) as pwd

    26 of bitpowers

    27.

    PWD

    -------------------------------------------------------------------------------------------------------------------

    12412913141313139139130121

    Now, the problem of decryption is that these numbers are concatenated without padding for a fixed number of digits by value, so you don't know if it was

    '12' |' 4'||' 12' |' 9'||' 13'... and so forth as we did it, or whether he was

    '1'||' 2'||' 4'||' 12' |' 9'||' 1'||' 3'... and so on, or any other combination of values from 0 to 15

    There is essentially no information to allow you to divide the string upwards in the correct components to allow the whole process be reversed.

    So, you are out of luck... no chance of decrypting it.

  • How to write a generic function.

    Hello

    Can someone tell me the concept, I have to get hip to in order to write a generic function that will work on any object?

    Here is the project: I'll be show 24 graphs, (imported as Bitmaps and BitmapData jpg), and I would like to create a function where onRollover graph would be tween on twice its size, then come back to the original dimensions when the mouse is released. Pretty simple.

    I'm OK with everything about the import of jpg files and to implement the action of Tweener. And I think it's good to be a better way to write different functions of RollOver and RollOut for each graph, but I must have been absent that day.

    When I use 'this' in the function, it behaves like 'this' is planned: any change! But it's not what I'm shooting.

    I expect to write the function ONCE and apply it to all the graphics after that I have addChild-ed them, but I can't figure out how to set the variable (in the function) which refers to some object (Bitmap graphics) is set up to the course.

    I declare a public variable or something? And match to what is reversed? No need a step by step tutorial, just of me not to point in the right direction. I'll ask Shupe and Rosser. :)

    Oh, uh, Flash CS3, AS3... (I prefer to use the Flash environment because I'm still not enough good for simply create the .as files.)

    Thank you!

    Each of your JPGs load as a MovieClip/Sprite. Say mc1, mc2...
    Then set properties for all the clips as below

    MC1.buttonMode = true;
    MC1.mouseChildren = false;
    MC1.addEventListener (MouseEvent.MOUSE_OVER, onMouseOver);
    MC1.addEvenListener (MouseEvent.MOUSE_OUT, onMouseOut);

    function onMouseOver(evnt:MuseEvent)
    {
    new Tween (evnt.target, "x", Regular.easeInOut, evnt.target.x, evnt.target.x * 2, 5, true);

    new Tween (evnt.target, "y", Regular.easeInOut, evnt.target.y, evnt.target.y * 2, 5, true);
    }

    This is what helped?
    Tell me if you need something more...

  • How to write insert and update blocks about with an if

    Hai All

    How to write an insert and update block education about with in an if

    I had a condition Ie

    If the time is between 0630 and 1030


    then

    Insert into Daily_attend
    ----


    Update Daily_attend set

    -----

    Concerning

    Srikkanth.M

    There is nothing preventing you to do this:

    BEGIN
      INSERT INTO x (mycolumn) VALUES ('A');
    
      UPDATE x
      SET mycolumn = 'B'
      WHERE mycolumn = 'A';
    
      COMMIT;
    END;
    /
    

    other than the fact that he seems a bit inefficient. Yet once you try to do, and why, is not clear.

    Can you put an IF statement in there to choose one way or the other under certain conditions? Yes. But I wonder if what you
    are actually trying to do is to reinvent the MERGE statement.
    http://www.morganslibrary.org/reference/merge.html

  • Screw vs Express SoftMotion function blocks

    Hello

    Are there differences between express screw SoftMotion function blocks? I intend to drive a servomotor through a NI 9505. Examples AND show how using function blocks, but I've been advised to use the screw Express instead, work around odd behavior when using a simulated axis (http://forums.ni.com/t5/LabVIEW/SoftMotion-quot-Update-Buffer-quot-VI-refuses-to-take-more/m-p/22508...

    Thank you!

    Hi JKSH,

    If I booted up a new application, I would use screw Express on function blocks. Here is a list of things to consider when choosing:

    1. By default, function blocks are asynchronous. They run on the rising edge of the entry "run" and are carried out when the output "done" is high. They do not block and function block architecture will almost always call the same function blocks again and again in a loop. You control the flow of execution with the 'run' and 'done' entry and exit. Screw Express, on the other hand, are synchronous by default. They don't have an entry not "run" and instead start running as soon as they are called. They block also until the end screw Express can be converted to asynchronous by right-clicking on them and by changing the "calendar model. When you change the calendar in asynchronous model, the Express VI will now act exactly like a function block.

    2. In general, you should never mix asynchronous and synchronous API. Your application should be one or the other. If it is possible to have safe synchronous and asynchronous calls, you must be very careful and really know what you're doing.

    3. To my experience, write simple applications is easier with a synchronous API, and more complex applications are better suited to an asynchronous API. Since blocking synchronous calls, you need more loops in your application and it can become difficult to maintain.

    4. There is also the property node / API call, on which are based the functional blocks and screw Express. You can do a right click on a function block or Express VI and convert it into a Subvi to see the underlying code. Then the function blocks and screw Express can be pleasant to work with, you must sometimes lower level control that is offered by the property and invoke nodes.

    I looked at your other post and it seems that you meet one of the intricacies of asynchronous calls. In point 1 above, I mentioned that function blocks increase sensitive edge on the execute line. In your modified sample and the original sample, the 'Update buffer' function block is executed when space becomes higher or equal to the "size of the Contour data. In the original example, the size of the table is 40, but in your example, it is 100. We will follow the stream through the example:

    1. We do nothing in the first round since we do not see a rising edge of the signal "run" "Initialize the buffer" until the second iteration.

    2. At the beginning of the second iteration, we initialize the table with 20 points, leaving 20 spaces available. This function block can take more than one iteration to complete, so that the loop can run several cycles before the release of "Done" is set to true. In this case, the next block runs.

    3. Then we start the move of contour. No point is taken in the buffer zone This occurs in the part of the user rather than the scan code.

    4. Then, we see that there are 20 spaces available, so we add more than 20 points to the buffer, leaving us with 0 beds available. This means that in the next iteration of the loop, the signal "run" function block 'Update buffer' will be false. This is essential to the functioning of the example.

    5. Since there is no abandonment called, we have a loop around back.

  • Each scan, SoftMotion takes a point in the buffer zone. Finally, the number of available points will be 20. When this happens, the entry "run" will switch from false to true on the 'Update buffer' function block and 20 points more will be added to the buffer. This cycle continues until you stop.
  • So, what was wrong with your changes? You did the size of the table 100 points. If you look at the steps above, you will see that in the example, we have 40 points in the buffer before taking points. If you increase the size of the table to 100, it means that there are 60 places available. However, 60 is always higher than the "size of data contours" (which is 20) and so the entry "run" function block 'Update buffer' will never wrong; We have always more available space than the "size of data contours. Since "run" is sensitive edge up, we are never really new data in the buffer, and so you get only two cycles that you initially put in. I agree that it is difficult, but it's exactly as function blocks are supposed to work and are certainly something to think about when you use the asynchronous API.

    Thank you

  • In the target FPGA read/write control function?

    Hi people,

    I learn a lot from the sample project FPGA, including how you can easily retrieve and set controls and indicators in an FPGA using the read/write control function running in an RT target.

    However, I can't find a way to do something similar in a FPGA target.  I've been down this road before - that is, trying to move the data in/out a looping VI FPGA (void) to a (parent) FPGA VI - where my memory points to reach what I needed use.

    So I was happy to see the palette FPGA enabled me to drop the control functions to read/write on a FPGA vi target.  But alas there where tons of errors (not compatible son for target, etc.) and I guess now it's not possible.

    So, just to be sure, I'm not missing something, is there something like control functions to read/write to use in an FPGA for read/write in an another FPGA (looped)?

    In addition, why would I be able to read/write on a FPGA vi control functions if they are not supported?  (Sorry for the n00b question)

    Thank you

    Steve

    maherhome wrote:

    You're right that I don't have this knot in my palette.  However, I also do not seem to have a Refnum Occurrence in the palette is in the FPGA (see below), but I need to synchronize several loops of FPGA and added research using the textfield in the VI editor (and if compiles and runs).  So 6 months to Labview and I'm fuzzy on how the palette is restricted

    I don't know what you're trying to prove here. There is no control of refnum in search in your image. Occurrences are available in FPGA, and for control of refnum for one you just right click on a function of the instance and create a control. If you can create a valid thread of a certain type of data, then you can create a control or the indicator for it, regardless of the question to know if this type of control or indicator appears in the palettes. However, the functions that you can use in the block diagram are limited by what is available in the palettes.

    maherhome wrote:

    Regarding orders read/write for the FPGA/lights, I'm surprised that the infrastructure developed to allow read/write between RT and FPGA has not mobilized to allow read/write between FPGA and FPGA.  The elements of memory function, but they are less convenient.

    You may have noticed that you cannot compile the individual parts of an FPGA VI and combine them later; This is because when you compile an FPGA VI, all its subVIs are essentially merged to create a single block diagram (with additional logic if one not reentrant Subvi is used in multiple locations, this is why it is not recommended on FPGA). The subVIs no longer exist in the FPGA compiled; reading and writing a control on them would make no sense. If you want similar behavior, use global variables - but understand that global variables store values in FPGA logic resources. Using the elements of memory (or FIFO, which can also store in memory) leaves more fabric available FPGA logic by storing data in resources specially designed for this purpose.

  • How to write data in mode intertwined with TDMS C DLL 2.0?

    Hello

    How to write data in mode intertwined with TDMS C DLL 2.0?

    I use DAQmx features in Visual Studio C++ without Measurment Studio.

    This function returns the data in interlaced mode.

    How can I configure the functions of DLL C TDMS to store this data in the tdms files?

    I see that it is not possible with the PDM version 2.0 with 1.0.

    Thank you

    -TDM C Dll is not able to do

    -TDM header writer may be usable for this but is not able to be used for tdms files.

  • Does anyone know of a VI or how to write one that will stop the computers time be disabled if an application is run.

    Does anyone know of a VI or how to write one that will stop the computers clock be turned off if an application is run. The time and date can be reset normally while an application is running by clicking on the time in the lower right of the screen of the computer. I have an application that runs over several days and it is essential that the time and date of the computer not be changed. Is there an easy way of this lockout the user? Note that I am what I consider a beginner advanced in LV

    Thank you

    Chuck

    This isn't something that you can from LabVIEW, because this is an operating system operation, and it will depend on the operating system you are using. Under Windows, you can use Group Policy to control this. Please Google on "prevent changing the date and time of windows."

    Also, please try to refrain from stuffing your message in its entirety in the block of material. Keep short, but descriptive enough topic so we can understand what you're asking basically. Thank you.

  • How to write a single line instead of the entire port?

    Hello

    I followed the example for writing to the digital line as follows

    int taskHandle;

    given int [8];

    char linename [] = "" dev2/port0 / line0:7 ";"

    DAQmxErrChk (DAQmxCreateTask ("", & taskHandle));

    DAQmxErrChk (DAQmxCreateDOChan (taskHandle, linename, "", DAQmx_Val_ChanPerLine));
    DAQmxErrChk (DAQmxStartTask (taskHandle));
    DAQmxErrChk (DAQmxWriteDigitalU8 (taskHandle, 1, 1, 10.0, DAQmx_Val_GroupByChannel, data, NULL, NULL)); Here the data have 8 digits
     
    Error:
    SetWaitCursor (0);
    If (DAQmxFailed (error)) DAQmxGetExtendedErrorInfo (errBuff, 2048);
    If (taskHandle! = 0)
    {
    DAQmxStopTask (taskHandle);
    DAQmxClearTask (taskHandle);
    }
    If (DAQmxFailed (error)) MessagePopup("DAQmx Error", errBuff);

    The example above shows how to write 8 binary to 8 lines, but how to write only one line? I try the following code, but it does not work

    char linename [] = "dev2/port0/line 2;

    ...

    DAQmxErrChk (DAQmxWriteDigitalU8 (taskHandle, 1, 1, 10.0, DAQmx_Val_GroupByChannel, & data [2], NULL, NULL)); Here the data have 8 digits

    The data format for the DAQmxWriteDigitalLines() function will do exactly what you want.

    The data format for the DAQmxWriteDigitalU8() function is a full port (even if you do not have a value of a harbour full of lines in your task).

Maybe you are looking for