Comment interfacer Labview avec JSON (JavaScript Object Notation) or AMF (Action Message Format) ?

Bonjour,
Comment interfacer Labview avec JSON (JavaScript Object Notation) or AMF (Action Message Format) en envoi et réception ?
Pourriez vous m'indiquer la procédure ?
Si vous avez des exemples ?
Merci d'avance et bon week-end.
Seb 

Bonjour,
Pour vos post en français, je vous invites à poster sur cette rubrique du forum:
Discussions de produit de NI.
Pouvez vous décrire pourquoi vous voulez vous interfacer avec du JSON ou du AMF?
Cordialement
Yann C.
France

Similar Messages

  • Comment interfacer Labview avec JSON (JavaScript Object Notation) ou AMF (Action Message Format) ?

    Bonjour,
    Comment interfacer Labview avec JSON (JavaScript Object Notation) ou AMF (Action Message Format) en envoi et réception ?
    Le but est d'automatiser le test et paramètrage de nos produits.
    Nos produits possèdent une interface web utilisant le protocole AMF sur http.
    Pourriez vous m'indiquer la procédure ? 
    Si vous avez des exemples ?
    Merci d'avance,
    Seb 

    Message Edité par Jérémy Marliot le 11-13-2009 03:11 AM
    Jérémy M. | Certified LabVIEW Developer
    Design Engineer - LinkedIn - Contact
    Don't forget to give Kudos to good answers.
    N'oubliez pas de donner un compliment aux bonnes réponses.

  • AJAX retrieval using Javascript Object Notation (JSON) - How To

    I have written up a how-to on my blog, explaining the steps involved to implement AJAX functionality using JSON for data transmission. It uses a simple example where the user makes a selection from a select list and 2 values are returned from the database into page items. I found it pretty simple to implement.
    http://anthonyrayner.blogspot.com/2007/06/ajax-retrieval-using-javascript-object.html
    Hope you like it, feedback welcome!!
    Anthony.

    Duplicate post.
    Yann C.
    France

  • Has anyone implemented JavaScript Object Notation in LabVIEW?

    Hi Guys,
    I was looking at writing an application using JSON-RPC
    http://en.wikipedia.org/wiki/JSON-RPC
    Has anyone implemented something similar, or are there any examples of this?
    I was going to write it with TCP VIs, and use string parsing to work through any responses, but if anyone had some advice, it would be appreciated.
    Cheers,
    Anthony

    Anthony,
    This sounds like a very interesting project and I would like to hear how it goes for you.
    You can of course choose to implement a JSON-RPC system using either TCP or HTTP as the transport. TCP would give you a potentially more responsive system but you would have to implement much more of the system from scratch as it were.
    As LaRisa_s was saying, if LabVIEW 8.6 is available to you, you can take advantage of the Web Services feature which will do a lot of the work for you. Your VI that runs as a web service would have to parse the data sent from the client to determine the correct VI to call and then convert the parameters and call the VI.
    You are completely correct that there is no direct support for JSON-RPC. We evaluated several Web Service and RPC mechanisms before deciding on RESTful web services for LabVIEW 8.6. In fact, if you have LV8.6 and JSON-RPC isn't a hard requirement, I would strongly recommend looking at using the RESTful mechanism that is built in. If you can use it then much less work will be required of you on the server side of your application.
    If you do need to go with JSON-RPC I would be interested to hear what factors went into the decision so we can improve LabVIEW's built in web services.
    Either way- let us know how your project goes.

  • Interfacer LabVIEW avec un oscilloscope LeCroy Waverunner 6100 A

    Bonjour je suis un nouveau utilisateur de LabVIEW !
    Je voudrais savoir comment faire pour aquerir le graph d'un signal sur un oscilloscope LeCroy Waverunner 6100A, et l'analyser sur LabVIEW (bref controler l'oscilloscope a partir du LabVIEW). J'ai fait installer NI-VISA sur l'ordinateur, et NI-DAQmax. Si vous pouvez m'envoye la procedure a faire, ou un lien vers un site, ou un document PDF.
    Merci beaucoup...

    Bonjour,
    Si j'ai bien compris, vous voulez utiliser un oscilloscope LeCroy et acquérir des données via ethernet ou gpib. Je ne connais pas la démarche exacte avec LeCroy, mais vous pouvez trouver pas mal de drivers LabVIEW sous www.ni.com/drivers . Je pense que cette adresse correspond à votre matériel http://sine.ni.com/idnetwork/main/p/sn/n25:LM.lecroy/sb/navsRel?q=6100A. Pour la mise en oeuvre, vous passera certainement par les outils VISA fournis par NI (ou peut être par LeCroy???), NI-DAQ ne devrait vous être d'aucune aide ici, vu qu'il s'agit de drivers utilisés pour les cartes multifonction de National.
    En espérant que cela réponde à votre question.
    bon courage

  • JSON, Javascript, PHP and JQUERY

    Hi,
    In my earlier post, I decided to go with PHP and leave
    ASP.NET 3.5 for the time being. I now need your help in charting a
    way to learn PHP.
    I am a Web Designer and I have started using JQuery
    extensively in the websites, as I love JQuery and it makes the life
    so much easier. What I want to know from you all that :
    Q1) What is JSON and do I need to learn it if I am getting
    into PHP?
    Q2) Since, I am using JQuery, do I need to learn Javascript
    from bottom to top? Does it help to master Javascript thoroughly?
    Q3) What should be my learning path? Should I start with PHP
    or Javascript first?
    There are so many things to learn and very less time. Also,
    if you all can tell me some books (apart from David's :-)) ) which
    will help me in learning.
    Thanks to all.
    Gaurav

    gaurav_ch wrote:
    > Q1) What is JSON and do I need to learn it if I am
    getting into PHP?
    JSON is JavaScript Object Notation. It's a shorthand way of
    transmitting
    data. You don't need to know it for PHP, although PHP does
    have support
    for JSON>
    > Q2) Since, I am using JQuery, do I need to learn
    Javascript from bottom to
    > top? Does it help to master Javascript thoroughly?
    No, you don't need to learn JavaScript from bottom to top to
    use jQuery.
    However, a good understanding of JavaScript will improve your
    ability to
    use jQuery or any other JavaScript framework.
    > Q3) What should be my learning path? Should I start with
    PHP or Javascript
    > first?
    I would start with PHP first. PHP is a server-side language,
    so your
    content is delivered to all users. JavaScript is normally
    used on the
    client-side (within the browser), so the small percentage of
    people who
    browse with JavaScript disabled don't see content or effects
    delivered
    by JavaScript. It's also important to realize that search
    engines don't
    spider content that is generated by JavaScript.
    > Also, if you all can
    > tell me some books (apart from David's :-)) ) which will
    help me in learning.
    I find "Programming PHP" by Kevin Tatroe and Rasmus Lerdorf
    very useful.
    "Pro PHP Security" by Chris Snyder and Michael Southwell is
    also
    essential reading.
    For jQuery, "jQuery in Action" by Bear Bibeault and Yehuda
    Katz is
    excellent.
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Comment créer une dll sous labview avec plusieurs fonctions venant du même VI et possédant un tabcontrol ?

    Comment créer une dll sous labview avec plusieurs fonctions venant du même VI et possédant un tabcontrol ?

    Bonjour,
    L’utilisation d’une « commande d’onglet », ou « tabcontrol », ne pose pas de problème pour la définition d’une DLL à partir d’un VI.
    Selon la version de LabVIEW que vous utilisez, le processus de création de DLL sera différent.
    Si vous utilisez une version antérieure à la v8, vous pouvez vous reporter à ce lien : Construire une DLL avec LabVIEW 7.0.
    Sinon, vous devez enregistrer votre VI dans un projet, puis définir le connecteur de votre VI avec les paramètres d’entrées/sorties (cette opération est indépendante des différentes « commandes d’onglet » que vous avez pu implémenter).
    Sélectionnez, dans le projet les « spécifications de construction » dans le projet (via un click droit), pour créer une DLL. Dans la boite de dialogue qui s’ouvre alors, à l’onglet « fichiers source », vous pouvez ajouter votre VI parmi les « VIs exportés » et configurer, en fonction des E/S câblées sur le connecteur de votre VI, les fonctions contenues dans la DLL.
    J’espère que ces quelques éléments auront pu vous éclairer.
    Cordialement,
    Guillaume H.
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    >> NIDays 2011, le mardi 8 février au CNIT de Paris La Défense

  • Comment creer une interface labview pour simuler une cle hasp

    bonjour,
    je souhaite creer une interface labview pour simuler une cle hasp.
    si quelqu'un sait comment faire je vous remercie d'avance de votre aide 

    Hello,
    Please post this question on the French forums to get a prompt response to your question:
    http://forums.ni.com/t5/Discussions-au-sujet-de-NI​/bd-p/4171
    Regards
    Arham H
    Applications Engineer
    National Instruments

  • Slt! je ne sais Pas commenter éffectuer des Recherches DANS this BASE DE DONNEES à partir de l «interface labview

    s il vous plait aidez moi! merci  
    JE SUIS labview débutante, Dans le cadre de l'Etape de mon aileron de d'études j ai déja programme Réaliser non labvieuw Sous Qui Permet Enregistreur de Données du diameter ET la date de je ne sais Pas intervenant éffectuer des Recherches DANS CETTE BASE DE DONNEES à partir de l interface «labview SELON la date de de et le Produit et merci 
    Attachments:
    PFE - Copie.vi ‏496 KB

    One of many duplicates. STOP your spamming.
    http://forums.ni.com/t5/LabVIEW/je-ne-sais-pas-comment-effectuer-des-recherches-dans-cette-base/td-p...
    Please keep your posts in your original thread or post in English.

  • Je ne sais pas comment effectuer des recherches dans cette base de données à partir de l'interface labview selon la date et le produit

     s il vous plait aidez moi !   merci  
    JE SUIS labview débutante, Dans le cadre de l'étape de mon aileron de d'études j ai déja Réaliser programme non Sous labvieuw Qui Permet Enregistreur de Données du diamètre ET date de je ne sais Pas commenter éffectuer des Recherches DANS this BASE DE DONNEES à partir de l «interface labview SELON la date de et le Produit et merci 
    Attachments:
    PFE - Copie.vi ‏494 KB

    Hi,
    Could you please post your question on our French forums here:
    http://forums.ni.com/t5/Discussions-au-sujet-de-NI/bd-p/4171
    Regards,
    Lindsey W. | Applications Engineer | National Instruments

  • How to manipulate a javascript object in java?

    Hi, I am fiddling with the java scripting interface. As I understand the rhino engine is packaged with the jdk but what I don't understand is how does one reconcile the objects one gets from their engine (e.g. sun.org.mozilla.javascript.internal.ScriptableObject) versus the ones in the rhino api (e.g. org.mozilla.javascript.ScriptableObject)?
    Is the one in the jdk heavily modified or wrappered up to suit their javax.scripting interface?
    More specifically, how do I manipulate javascript objects from java?
    e.g. suppose I have this java code:
    ScriptEngineManager mgr = new ScriptEngineManager();
    ScriptEngine js = mgr.getEngineByName("js");
    jsEngine.eval("var foo = { x : 1, y : 'hello', z : false };");
    Object o = jsEngine.get("foo");Now o is instanceof sun.org.mozilla.javascript.internal.NativeObject, which is a subclass of a bunch of other classes in the s.o.m.j.i namespace. Being internal I can't use these directly.
    Looking at the Rhino API obviously you normally get a org.mozilla.javascript.ScriptableObject and can call the .get() .getIds() methods. But I don't know how to translate the objects I am getting in my actual java code which uses the jdk engine into org.mozilla.javascript objects.
    Is this even possible? Am I misunderstanding something completely? Should I just be using the rhino js jar and not the javax.scripting interface? If so, for what reason is the javax.scripting interface implemented?

    Assuming that you DO want a deep copy, begin with a constructor that takes another hand.
    public Hand( Hand h ) { ...Then for each instance variable, within that constructor:
    this.instVar0 = h.instVar0;
    this.instVar1 = h.instVar1;
    . . .And last, for every reference, make sure there is a constructor (or copy method for arrays) that itself makes a deep copy:
    this.ref0 = new Ref0Type( h.ref0 );

  • How to upload a document with values related to document properties in to document set at same time using Javascript object model

    Hi,
          Problem Description: Need to upload a document with values related to document properties using custom form in to document set using JavaScript Object Model.
        Kindly let me know any solutions.
    Thanks
    Razvi444

    The following code shows how to use REST/Ajax to upload a document to a document set.
    function uploadToDocumentSet(filename, content) {
    appweburl = decodeURIComponent(getQueryStringParameter('SPAppWebUrl'));
    hostweburl = decodeURIComponent(getQueryStringParameter('SPHostUrl'));
    var restSource = appweburl +
    "/_api/SP.AppContextSite(@target)/web/GetFolderByServerRelativeUrl('/restdocuments/testds')/files/add(url='" + filename + "',overwrite=true)?@target='" + hostweburl + "'";
    var dfd = $.Deferred();
    $.ajax(
    'url': restSource,
    'method': 'POST',
    'data': content,
    processData: false,
    timeout:1000000,
    'headers': {
    'accept': 'application/json;odata=verbose',
    'X-RequestDigest': $('#__REQUESTDIGEST').val(),
    "content-length": content.byteLength
    'success': function (data) {
    var d = data;
    dfd.resolve(d);
    'error': function (err,textStatus,errorThrown) {
    dfd.reject(err);
    return dfd;
    Then when this code returns you can use the following to update the metadata of the new document.
    function updateMetadataNoVersion(fileUrl) {
    appweburl = decodeURIComponent(getQueryStringParameter('SPAppWebUrl'));
    hostweburl = decodeURIComponent(getQueryStringParameter('SPHostUrl'));
    var restSource = appweburl +
    "/_api/SP.AppContextSite(@target)/web/GetFolderByServerRelativeUrl('/restdocuments/testds')/files/getbyurl(url='" + fileUrl + "')/listitemallfields/validateupdatelistitem?@target='" + hostweburl + "'";
    var dfd = $.Deferred();
    $.ajax(
    'url': restSource,
    'method': 'POST',
    'data': JSON.stringify({
    'formValues': [
    '__metadata': { 'type': 'SP.ListItemFormUpdateValue' },
    'FieldName': 'Title',
    'FieldValue': 'My Title2'
    'bNewDocumentUpdate': true,
    'checkInComment': ''
    'headers': {
    'accept': 'application/json;odata=verbose',
    'content-type': 'application/json;odata=verbose',
    'X-RequestDigest': $('#__REQUESTDIGEST').val()
    'success': function (data) {
    var d = data;
    dfd.resolve(d);
    'error': function (err) {
    dfd.reject(err);
    return dfd;
    Blog | SharePoint Field Notes Dev Tools |
    SPFastDeploy | SPRemoteAPIExplorer

  • Is there a way to interface Labview Web GUI with Fusion Charts?

    Is there a way to interface Labview Web GUI with Fusion Charts for dynamic web presentation?
    http://www.fusioncharts.com/

    I have a ballistics program which our clients can use (see attached).  Basically there is a series of Cascading Combo boxes that the user must select for Bullet Manufacturer, Caliber, and Bullet ID.  The program then goes out to the relevant data file (.CSV) and provides ballistic inputs for the selected projectile.  The user is also required to enter in additional data, such as Sight Height, LOS Range, Temp, etc..  Once all data is input, the user either hits the Calculate Button or the Tab (I'm using Event Structures and I now realize this is an issue for Web UI Builder), and the data gets passed to a MathScript which then crunches numbers and spits output to fill a table and a series of Graphs based upon the tablulated data (if so desired).
    I was hoping to use Labivew for the first two parts ( Data Collection and Number Crunching) and use something like Fusion Charts for the presentation.  I tried learning Ruby on Rails.  I was successful with the Ruby part (basically the Mathscript portion) but really got hung up on the Rails section and the need for something like JSON to interface with it.  Could not find a useful source of information which really showed you how to combine the two effectively. 
    Attachments:
    Ballistics1.JPG ‏144 KB
    Ballistics2.JPG ‏265 KB

  • Unable to update rating (rating column) on host document using JavaScript Object Model API inside sharepoint hosted apps

    Hi Everyone,
    We are developing SharePoint hosted apps for Office 365, for that we are going
    to implement document rating functionality inside Sharepoint app. The host web contain document library (“Documents”) and from apps we need to rate each document. The rating functionality working fine with CQWP in team site  using
    JavaScript Object Model API.
    But the same code is not working inside apps and giving error:-
    If we are using app context than error will be:-
    "List does not exist.
    The page you selected contains a list that does not exist.  It may have been deleted by another user."
    And for Host context than error will be:-
    "Unexpected response data from server."
    Please help on this
    Please see below code..
    'use strict';
    var web, list, listItems, hostUrl, videoId, output = "";
    var videoLibrary = "Documents";
    var context, currentContext;
    var lists, listID;
    var list, parentContext;
    var scriptbase;
    (function () {
        // This code runs when the DOM is ready and creates a context object which is 
        // needed to use the SharePoint object model
        $(document).ready(function () {
            hostUrl = decodeURIComponent(getQueryStringParameter("SPHostUrl"));
            context = SP.ClientContext.get_current();      
            SP.SOD.executeFunc('sp.js', 'SP.ClientContext', sharePointReady);
        function sharePointReady() {
            scriptbase = hostUrl + "/_layouts/15/";
            // Load the js files and continue to the successHandler
            $.getScript(scriptbase + "SP.Runtime.js", function () {
                $.getScript(scriptbase + "SP.js", function () {
                    $.getScript(scriptbase + "SP.Core.js", function () {
                        $.getScript(scriptbase + "reputation.js", function () {
                            $.getScript(scriptbase + "sp.requestexecutor.js", execCrossDomainRequest);
        //Query list from hostweb
        function execCrossDomainRequest() {       
            //Load the list from hostweb
            parentContext = new SP.AppContextSite(context, hostUrl);
            web = parentContext.get_web();
            list = web.get_lists().getByTitle(videoLibrary);
            context.load(list, 'Title', 'Id');
            var camlQuery = new SP.CamlQuery();
            camlQuery.set_viewXml('<View><Query><OrderBy><FieldRef Name="Modified" Ascending="FALSE"/></OrderBy></Query><RowLimit>1</RowLimit></View>');
            listItems = list.getItems(camlQuery);        
            context.load(listItems);
            context.executeQueryAsync(onQuerySucceeded, onQueryFailed);
        //Process the image library
        function onQuerySucceeded() {       
            var lstID = list.get_id();
            var ctx = new SP.ClientContext(hostUrl);       
            var ratingValue = 4;
            EnsureScriptFunc('reputation.js', 'Microsoft.Office.Server.ReputationModel.Reputation', function() {      
            Microsoft.Office.Server.ReputationModel.Reputation.setRating(ctx, lstID, 1, ratingValue);       
            ctx.executeQueryAsync(RatingSuccess, RatingFailure);
        function onQueryFailed(sender, args) {
            alert('Failed' + args.get_message());
        function failed(sender, args) {
            alert("failed because:" + args.get_message());
        function RatingSuccess() {
            alert('rating set');
            //displaystar();
        function RatingFailure(sender, args) {
            alert('Rating failed : : ' + args.get_message());
        //Gets the query string paramter
        function getQueryStringParameter(paramToRetrieve) {
            var params;
            params = document.URL.split("?")[1].split("&");
            for (var i = 0; i < params.length; i = i + 1) {
                var singleParam = params[i].split("=");
                if (singleParam[0] == paramToRetrieve) return singleParam[1];
    Thanks & Regards
    Sanjay 
    Thank you in advance! :-)
          

    Hi,
    According to your post, my understanding is that you want to update list column in SharePoint hosted apps using JavaScript Client Object Model.
    Based on the error message, it seems not retrieve the list object in context. I suggest you debug the code step by step using Internet Explorer Developer Tools to
    find the problem.
    Here are some demos about using JavaScript Client Object Model in SharePoint hosted app:
    http://blogs.msdn.com/b/officeapps/archive/2012/09/04/using-the-javascript-object-model-jsom-in-apps-for-sharepoint.aspx
    http://sharepoint.stackexchange.com/questions/55334/how-to-access-list-in-sharepoint-hosted-app
    http://www.dotnetcurry.com/showarticle.aspx?ID=1028
    Best regards
    Zhengyu Guo
    TechNet Community Support

  • Interface labview program with real appliances

    How do i interface labview program with real life appliances. For example: interface with light bulb

    I suppose you could also find some kind of adapter to turn it into an IP based appliance and you could control it through the ethernet.  Or you could wait a few decades and interface LabVIEW 2059 with your cranial implant to directly control your light bulb. 
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

Maybe you are looking for

  • Photograph - Photoshop CS5 Cloning

    I have been using the new CS5 photoshop for about 6 months. I have a grasp on the basics of cloning/healing inc the new content aware fill (which is great). I can get good results on simple cloning but on complex stuff I really struggle. I could do w

  • I have problems with activation, after delete mi Iphone from Icloud.

    I have problems with activation, after delete mi Iphone from Icloud.

  • ALV Report Toolbar

    Hey All, in my ALV report I am not able to see standard toolbar. I have copied the same using SE80 and when I check my program in SE80 it shows the Standard Toolbar to be there. Can someone help me how to add the same. Also I am using standard functi

  • Fragment question today

    Good afternoon, im playing around with fragments and i though i was understanding the concept just fine until i decided to build a Fiscal Year (FY) fragment. My idea was to build a FY frag that i could attach to all my 250 forms and once a year, upda

  • [Solved] xfce4-power-manager broken in Xfce 4.10?

    EDIT: I found out that the "Lid closed"-event is apparently now also recognised as a "Sleep button"-event by the kernel. Both events triggered a suspend command when I closed the lid, which led to some weird shit. Last edited by IceHand (2012-06-18 1