Write real Labview 8.2 Twincat embeded application variables

Hello

I am currently using Labview to write and read variables defined by an embedded application of Twincat.

I set the following variables in Twincat:

Lab_lecture_real % MW100: REAL;
Lab_ecriture_real to % MW102: REAL;

Mo1% Lab_lecture_bool: BOOL;
Lab_ecriture_bool % MB2: BOOL;

Based on the VI given by Beckhoff to Twincat ADS/OCX (http://infosys.beckhoff.com/english.php?content=../content/1033/tcsample_labview/html/tcsample_labvi... =), I managed to read the variables 'Lab_ecriture_real' and 'Lab_ecriture_bool' and write through 'Lab_lecture_bool '.

However, I forgot to write in "Lab_lecture_real", which is a real.

I enclose my VI, everything seems to be connected correctly. However, I do not understand why it works for a Boolean variable, rather than a true. The method used for writing a real is perhaps different from Boolean.

Can you stress me about this, please?

Kind regards

Stéphane

Why you set the length for the REAL number 8 in VI?

It is in the documentation of the OCX elsewhere?

Tags: NI Software

Similar Questions

  • using the module time real Labview in RTAI

    Hi all

    I want to use the module time Labview in RTAI real for real time due to its open source applications and very good performance. is it possible to make this work?

    If this is the case, can anyone introduce a single study of case or something similar to this?

    Cecile says:

    Hi all

    I want to use the module time Labview in RTAI real for real time due to its open source applications and very good performance. is it possible to make this work?

    If this is the case, can anyone introduce a single study of case or something similar to this?

    I don't think it's possible for anyone outside of OR. LabVIEW Real-time supports this time only Windows as host and as a target only material of National Instruments with specifically targeted OSes or the Pharlap ETS system on x 86 systems with hardware specific enough. Using RTAI as target OS for LabVIEW Real-time applications requires first a few changes on the time plugin real LabVIEW to support this new platform.

    None of the files in time real LabVIEW also created for either platforms OR running VxWorks or OS Pharlap, Pharlap ETS system woud be able to be deployed to a system RTAI, because they are not compatible. In the first place, you'd have to port the bunch of shared libraries that make up the time target real system running LabVIEW on one of these goals to your RTAI system which is in fact a whole new platform of LabVIEW you can create with a little effort from the LabVIEW source code. It's not really impossible for OR as most of the code LabVIEW is written platform completely independently, but it would be a combination of the parameters compilation for course LabVIEW Real-time, with the settings to produce time targets real LabVIEW VxWorks with some additional settings of Linux. Yet, it would be by far not trivial and some parts are actually hardware specific drivers that must be worn too and limit the possibilities of what RTAI material could serve even further. In short not something that would make any commercial sense NC because they invest a lot of resources with no opportunity to sell additional hardware.

    And hell freezes over up front release of NI LabVIEW source code in any form which gives access not - OR used to it!

  • LabView 2013 or 2014 Web Application Server does not start.

    I have a request that I built in 2013 of LabView that uses the Web application server OR. The application worked until end November 2014 when the Web in LabView 2013 application server has stopped working. Specifically, 2 and 1) NI NI Application Server Web services) Web Server system both were running, but I was unable to access web pages that I created earlier, or I could access the Configuration Web page OR localhost:3582. In addition, the button "Configure Web Application Server" under "Options/Web Server" is gray. Makes me think that web services NOR did not start successfully upward. Complete a repair facility OR to the LabView 2013 install did not help either.

    Since the opening of a service ticket with NEITHER, I've now deleted and reinstalled the 2013 LabView and LabView 2014 each with the latest patches. But the problem persists.

    The ticket OR for that matter now rests with RnD, so I'm tender hand to the community OR to see if anyone sees something similar? Or has any ideas to try?

    Some additional notes:

    (1) contrary to LabView LabView 2013 2014 no web services NOR would begin, based on a new for 2014 dependence on the Authentication Service of NOR. In 2014 this service does not either.

    (2) when I uninstall 2014 and re-install 2013, chess happens again (as above).

    (3) my system runs Win 7 Pro x 64 with 8 GB of RAM.

    (4) I have McAfee virus scanner/firewall. I have disabled and even uninstalled without correcting the problems.

    At this point any ideas to try would be greatly appreciated, because I can't wipe my OS and start over.

    Thank you

    * Update *.

    I finally found a solution to this problem. The solution is the following:

    1. Delete the two files "C:\ProgramData\National Instruments\NIAuth"

      • commitmark.1
      • Registry.bin
    2. Restart the OS and re-launching of LabView.

    On the next reboot, LabView recreates these two files and the Web services OR Windows services start normally. Once NI WebService which works normally.

    I'm assuming that one or both of these files has become corrupted at some point, that has kept the WebServices OR start properly. But as none of the services OR created an error event Windows for that matter, I stayed to search for the solution. And since the installer NOR has not remove or repair any of these files, the question continues to no matter how many times I have re-installed LabView on my system.

  • Pouvez LabVIEW DSC Run on embedded XP

    cross posted from LAVA

    Hello

    Anyone know if LabVIEW DSC works on XP embedded?
    These two positions are interesting: WinCE post post cRIO

    Concerning
    JG

    Hello jg-code.

    XP Embedded is not a supported operating system to run LabVIEW or the DSC Module development environment.  This does not mean that it won't work, only that we do not guarantee that it will work.  One of the reasons is that XP Embedded can be transformed into any variety of facilities.  The following link can provide useful information.

    Running LabVIEW on Windows XP Embedded

    http://zone.NI.com/DevZone/CDA/tut/p/ID/4011

  • Wide application variable

    What is the best way to implement a broad Application Variable.
    Here's what I want to accomplish. We have several users to get different data into the database. I want to filter the data, users see based on a column he'll call group appearing in each table.
    My thought was to put a drop-down list on the page of connection or of a page and that they would choose the data of the group to which they want to see.
    Then on each page queries for this page would have a where clause clause that would say where Group =: MY__APP_Variable.

    I don't know if it is the best way to achieve this.
    and if it's the best way that I am not sure how fully implent the application setting.
    I think I would create some type of variable under shared components
    then when they select the value in the drop-down on the connection I would equal to that variable.

    I don't know exactly how to proceed.
    Thoughts?
    Thank you

    qtjr, I asked you about the number of reports, so that if you have less number of reports, then you can have the option to change the Group on the screen instead of going to the first page to change the report. You have reports of 50 people or more, so is probably not a good option. Allow the user to select a group after their connection and set the value to a level application element.

    You can use a page level item, but I think a part of application-level will be a better option.

    Thank you
    Machaan

  • Loading Application Variable from a database

    I read upward on the use of XML and INI files to do this, but I really want to do with my database.

    I want to create a table in my database (MySQL) may be called settings_application, and it contains 3 columns (id, key, value).

    Example of a table

    settings_application

    ID | Key | Value
    ------------------------------------------------------------------------
    1. DSN | myDatabase
    2. pageHits | 38272
    3. encryptionKey | asdkjfadfw3r23e2

    So, I want to create a CFC that somehow will read all variables in the table and start to loop through them and turn them into application variables (in the scope).

    For example Application.dsn, Application.pageHits, Application.encryptionKey. I did it with the help of a cfloop and large cfif condition.

    The problem in this process is that I don't want to change the CFC code is I add a new parameter.

    If I added the following to the database...

    ID | Key | Value
    ------------------------------------------------------------------------
    4. author | Josh
    5. E-mail | [email protected]

    I don't want to go then edit the cfif tags adding:
    < cfelseif settings.key EQ 'author' > < cfset Application.author = settings.value >
    < cfelseif settings.key EQ 'email' > < cfset Application.email = settings.value >

    I hope I can do this. Please help sort you can. Thank you!

    He has worked with a version of it using the hooks...

    Thanks for the help!
    ------------------------------------------------------------------------------------------ -----

    SELECT *.
    Parameters



    #Application.encKey #.

  • Assign the value to the Application Variable via javascript

    Hello

    How can I assign value to an element of the application (not the page element) through javascript.

    I tried to assign the value as follows:

    $s ('F150_REGION_TEMP', region);

    where F150_REGION_TEMP is the application variable and 'region' is populated value in javascript.

    Kind regards
    Benz

    Hello

    Try

    
    

    BR, Jari

    Published by: jarola on March 1st, 2010 14:47

  • implementation of a function of time transfer real Labview program

    Hello

    I want to spend my control signal U through the 146 function /(S+276) for U_filtered

    How do I?

    I tried a low-pass filter, but I have the same results in comparison with Matlab.

    I mean I want to have:

    U_filtered = 146 /(S+276) * U.

    I have attached a picture for the signal U (yellow) and U_filtered (pink) in Matlab.

    I want to use in a real-time application

    Thank you

    How you implement the function of transfer in labview?

    I think this should be a separate implementation and maybe you already do. So forgive me if this is something you already know.

    Please see http://en.wikipedia.org/wiki/Low-pass_filter#Discrete-time_realization for an excellent time discreet introduction, low-pass filters.

    Essentially, you have to implement a discrete equation to achieve this. Something like:

    y(k+1) = 0.53 * alpha * x (k) + (1-alpha) * y (k)

    where alpha is related to the low-pass frequency and the frequency of sampling by alpha = flp /(fs+flp), flp is the low frequency of success and fs is the sampling frequency.

    In your case, flp = 276 and fs, it's whatever you choose to implement: it is the speed at which your loop runs on the RT or the FPGA or whatever. If speed is not a problem, I recommend 5000 rad/s or above as a starting point.

    The factor of 0.53 above is just the gain of the filter described you 146/276.

  • Cannot find FP write in LabVIEW 2012

    System: Win7 64 bit

    LabVIEW: LabVIEW 2012 (64-bit)

    I can't find FP read/write etc in LabVIEW 2012.

    I installed FieldPoint 6.11 and disk driver OR. Nothing happened... And I can't find "fieldpoint" folder in "vi.lib".

    I noticed that my Win7 "Program files" and "Program files (x 86)". The labveiw program was in "Program files", I think. But there is also a "National Instrument" folder in "program feels (x 86). I just used by default to install the labivew.

    Do not know why. Can anyone help?

    Hi Yang,

    FieldPoint is not supported with 64-bit LabVIEW.  I propose to install LabVIEW 32 bit and then see if you can see these FieldPoint VI.

    Kind regards

  • Problem installing module time real LabVIEW 2011 SP1

    Hi, I'm new here. I have a problem when I tried to install LabVIEW Real - Time 2011 SP1. Whenever the part of initialization, this message appears: "NEITHER Labview 2011 SP1 32-nit must be installed before installing the OR labview 2011 SP1 real-time Module.» I'm sure that I've already installed Labview 2011 32-bit SP1 and it works well. I use a Windows7 OS and also have Labview 2010 and an older version of Labview 2010 RT module installed. I didn't remove the old version of the software, and I don't know if it is related to this problem.

    Can anyone help? Thank you in advance!

    MrSun87 wrote:

    ... I'm sure that I've already installed Labview 2011 32-bit SP1 and it works well...

    Can post you a screenshot of MAX where are installed Versions of LabVIEW?

    Christian

  • Behavior in time real LabVIEW incompatible with nodes in control property

    LabVIEW 2014 no service don't pack

    cRIO 9068 (Linux) with dual CPU

    I've written a vi which interacts with the CVT to pass values between the CVT and a bunch of controls on the Panel before which are accessed by reference. My project supports a front panel, if it is connected, then you can use this Panel to interact with the system. All the controls are located in a tabbed pane on the main vi running on the RT module, all the features are contained in a subvi, which accepts an array of references to the command input.

    It works perfectly in developer mode. Then when I deployed the controls were completely isolated: nothing has been loaded and initialized from the CVT, changing values of control had no impact on the system.

    For debugging, I provided a string array of all labels of control so I could see what controls is taken up by the Group of experts. So, I thought that the first troubleshooting step would be to see if the autonomous execution of RT filled one of them. After the creation and execution of this, everything lights up and works perfectly.

    It seems that to allow some control connected to that communication of the façade with a sub - vi RT VI must appear on the front panel. If this is not the case, the sub - vi will not interact with controls at all.

    In my opinion, it's a bug. Comments or details, anyone?

    Thanks for all your replies. For the record, while the 9068 has no Panel incorporated, it supports remote facades. I use this function successfully. The core of the code runs without a head, I didn't want the hassle of establishing a completely independent group on an external PC.

    My initial analysis and statement of the problem was wrong. I thought I was running in RT with group work, but actually worked by the developer. Even with controls and indicators highlighted the sub - vi the Panel was still Catatonic.

    Then I re-read the documentation OR on the facades. They clearly affirm that if application of the RT IS CONNECTED to a front panel nodes of property etc. will work. If this isn't the case, the program will still run but indicate errors for operations of property node. General error handling is not made for information only Panel stuff, so I have not seen the error.

    It turns out that I've been collecting all the controls at the beginning. Developing mode of the front panel is still there, so it worked. However, when the RT target boots and starts, it is impossible to have a remote façade connected, so my set of controls was empty.

    Movement of the control the value code initialization (just to get an array of references to all the controls in the component of interest) in the area of code that is run after the mouse click that activates the Panel did the trick. If there is no remote Panel then person can click on it, but if there is a front panel then all the controls are there.

    Thanks again for ruminating with me.

    Bill

  • How to create a graph in time real LabVIEW 6.1?

    I am new to programming in LabVIEW (6.1). I wonder to create a LabVIEW interface that can operate the multimeter Keithley 6487, allowing us to apply a voltage and nth measures. With the measures that we have create a chart (V curve i) I find the XY graph, but it only allows to send all the measures at the same time (indexing) to generate the graph and not whenever we take the action so the graph build inn in real-time. I need to know how to create a chart or change the XY graph, so I can generate the i - V curve with each step we take in real time. Whenever we take the action and not once the program ends. Thanks in advance.

    You must place the graphic inside the loop and the use of shift registers to accumulate the X and Y in the form of tables. I do not have 6.1 right now in the process of execution, but it would basically look like this:

    Note that the above is for demonstration (the code is in fact a greedy loop). You can consider putting Scripture on file inside the loop. In this way, if the program crashes, you will not lose your data.

    WARNING: Using table build as indicated above will result in continued growth of memory. If your program is running for a long time, this can become a problem. One thing you may need to watch must have a limit on the size of the array. I know there is an example of "Table of XY" comes with LabVIEW, and I'm sure that this is with 6.1. You should take a look at this example, which implements a fixed buffer for the data in the chart size. You should be able to use the VI "graphic buffer XY"directly in your code. "

  • Acquisition of data in time real LabView

    I'm trying to get a better idea of what is happening when I'm DAQ using LabView RT compared to using the DAQ assistant (which cannot be used in LVRT).  In the DAQ assistant I could just say to acquire 300 samples at a rate of 3000 s/s.  The buffer waiting for 300 samples to fill, I could then take these samples and average in statistics to get a nice clean data every 100 ms.  I can't find out how to do something similar in LVRT.

    I am currently using a loop of data collection separate from my time critical loop operating at 100 ms.  I didn't tell him how many samples to catch so I guess he catches just real-time data point every 100 ms.  A number of data (pressure, temperature, flow, etc.) is written in a cluster that is sent to a network shared variable (which is sent to the loop of the host).  If I run the loop of the host to 1000 ms (where I save the data in a spreadsheet) just grabbing the 10th point data that the shared variable of the network trying to send to the host?  Is - this there anyway use LVRT in a similar way to the DAQ assistant, so that I can get the data more smooth.

    Oops - do not know what has happened to the code snippet (perhaps it was too big?) that I posted.  I will attach the VI himself here...

    BS

  • Problem of Windows vs Mac OS with socket read/write and LabView

    Hello

    I inherited, multithreaded code, with a singleton that communicates with LabView via few ports/sockets. I don't know (but don't think) mention it in this case multithreading issues, but in case you think there could be a problem. All communications to the LabView through LabView class (instance) singleton.

    When we run the code on the same box of MS Windows XP as the LabView so, it works properly; This means that LabView receives orders and the java receives the results. When we run it on a Windows XP box in another room with another subnet it works fine as well. When we run a Mac OS in the same room/network reader.ready () is not true in the time-out period. (see the line of reader.ready () in the original code).

    Does anyone know why it would work for Windows but not Mac OS?

    A current "guess" what is bad on my part, is that code below (taken out of context, otherwise the position would be really long) needs of some rethinking. Any help/comments/advice on how it is encoded is greatly appreciated.

    Here are the existing code.
    // some declarations.
        long t0, t1;
        long waittime = 5000;
        BufferedReader reader;
    
        public synchronized void connectCommPort() {
            if (commportconnected != true) {
                try {
                    sock = new Socket();
                    InetSocketAddress endpoint = new InetSocketAddress(IPaddress, commPort);
                    sock.connect(endpoint, 4000); // try to connect with a timeout of 4 seconds.
                    reader = new BufferedReader(new InputStreamReader(sock.getInputStream()));
                    writer = new PrintWriter(sock.getOutputStream());
                    System.out.println("mec: LabV: SUCCESS - network connection to Labview command port succeeded");
                    commportconnected = true;
                    errorstatus = false;
    
                } catch (IOException ex) {
                    logwriter("LabV: WARNING - network connection to Labview command port failed."+ex.toString());
                    System.out.println("mec: LabV: WARNING - network connection to Labview command port failed."+ex.toString());
                    commportconnected = false;
                    errorstatus = true;
                }
            }
        }
    
    
        public synchronized float readpot(int potnumber) {
    
            String smotor = Integer.toString(potnumber);
    
            if (potnumber >= 0 && potnumber <= 5) {
                String message = "pot " + smotor;
    
                connectCommPort();
    
                if (commportconnected) {
                    try {
                        writer.print(message + "\r\n");
                        writer.flush();
                        logwriter("LabV: [sent] " + message);
                        potvalue = potlistener();
                    } catch (Exception ex) {
                        System.out.println("mec: Exception while sending command "+ex.getLocalizedMessage());
                    }
                    disconnectCommPort();
                }
            } else {
                if (potnumber == 7 || potnumber == 6) {
                    potvalue = 5.f;
                    logwriter("Faked pot reading for potnumber " + potnumber);
                } else {
                    logwriter("WARNING: " + potnumber + " is not a valid pot number (must be 0 to 6)");
                }
            }
            return potvalue;
        }
    
        public synchronized float potlistener() {
    
            String message = null;
            t0 = System.currentTimeMillis();
            t1 = System.currentTimeMillis();
            boolean donereading = false;
            while ((t1 - t0) < (waittime) & donereading != true) {
                t1 = System.currentTimeMillis();
                try {
    
                    while (reader.ready()) {
                        message = reader.readLine();
                        logwriter("LabV: [received] " + message);
                        if (message.contains(".")) {
                            potvalue = Float.parseFloat(message);
                        }
                        donereading = true;
                    }  // close reader-ready-while
                } catch (Exception ex) {
                    System.err.println("Exeption in potlistener() "+ex.getLocalizedMessage());
                }
            } // close timeout while loop
    
            return potvalue;
        }
    In particular, I have readLine() in a loop where I catch the exception if it is not read and just keep trying? What is the "best way" to do?

    Here's what I thought, something like:
            while ( ((t1 - t0) < waittime) && !donereading ) {
                t1 = System.currentTimeMillis();
                try {
                    message = reader.readLine();
                    logwriter("LabV: [received] " + message);
                    if (message.contains(".")) {
                        potvalue = Float.parseFloat(message);
                        donereading = true;
                    }
                } catch (Exception ex) {
                    System.err.println("Exeption in potlistener() "+ex.getLocalizedMessage());
                }
            } // close timeout while loop

    (a) No, but I would look into the configuration of the network itself rather than the Java code.

    (b) the correct way to enforce a timeout of read is through Socket.setSoTimeout ().

  • LabView 8.5.1 embedded works on Windows 7 64 bit or 32 bit?

    I would like to install LabView 8.5.1 on Windows 7. Is it possible with 64 or / and 32-bit? Thank you!

    Thanks a lot for your help.

    So I just installed LabView
    integrated Blackfin 8.5.1 on Windows 7 64 bit and it still works
    without 'XP mode' also with the USB-emulator and VisualDSP ++ 5.0. Notice: the
    DVD - the installation program is not running on W7 (error-12) but you can install all
    module separately by using the configuration of modul of the DVD files.

    I'm happy, thank you...

Maybe you are looking for

  • Why Techtool and disk utility reports different SMART status?

    my laptop sometimes starts the sign of prohibition, and some start successfully. I guess it's the HARD drive, that this assumption holds up to what otherwise. All the Apple hardware test has passed including the extended version. the image below illu

  • Lenovo IdeaPad Y400 evolution Options

    Hello I plan to buy a Lenovo IdeaPad Y400 in the coming days. The shop I bought it from has the following characteristics: i7-3630QM -Windows 8 -8 GB DDR3 1600 MHz RAM -1 TB SATA HDD (5400 RPM) Modular DVD drive -NVIDIA GeForce GT 650M 2 GB GDDR5 I n

  • Problem with connection for ePrint

    HelloToday, I brought a new printer - all in one, HP Deskjet INK Advantage 3520. All functions are OK, but I have a problem with ePrint.In practice, the printer is connected to my wifi at home and I can print without USB cable with no problems. But w

  • Using the Runtime 6.1 with 2009 installed engine

    I have LabVIEW 2009 installed on developer and use it regularly.  I recently got some executables that run only under the runtime of 6.1.  I downloaded the RTE of 6.1, but have not installed.  Don't you think that the RTE of 6.1 installation will hav

  • ACER Aspire 4 gig of ram used only 1.74, how can I fix this?

    Hello I hope that I chose the right forum, if not, please go to the right place. I have an ACER Aspire 5552-5686, Windows 7 Home premium 64-bit with ATI Mobility Radeon HD 4250 graphics card. I have the latest version of my bios, 2.14 I have 4 GB of