NI Labs Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

NI cDAQ-9191 Mobile Device Support Discussion

Hello,

I have 2 questions,

Can i create mobile aplicatión with labview?

Can i create an aplication for a mobile to monitor bluethoot data?

Thanks,

0 Kudos
Message 31 of 47
(1,944 Views)

Dear Chris,

I am looking at the Web API interface and would like to use HTML and Javascript to directly acquire the the data from the cDAQ-9191. Do you have any examples on this?

Thank you.

0 Kudos
Message 32 of 47
(1,944 Views)

Chee_Teck wrote:

I am looking at the Web API interface and would like to use HTML and Javascript to directly acquire the the data from the cDAQ-9191. Do you have any examples on this?

Yes, the API and documentation is linked below. The documentation has example GET and POST requests that configure and acquire data from the device. There are also examples implemented in Objective-C, but the same structure and algorithm can be used in JavaScript; you'll just need to transcribe from one language to the other.

NI cDAQ-9191 Web API Documentation & Examples

https://decibel.ni.com/content/docs/DOC-21477

Joe Friedchicken
NI Configuration Based Software
Get with your fellow OS users
[ Linux ] [ macOS ]
Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
0 Kudos
Message 33 of 47
(1,944 Views)

Thank you. Yes, I have read the document but there are no examples that I can use to try. May I know if there are any ready ones? I am a beginner at html and JavaScript where any simple example will be most helpful. Thank you.

0 Kudos
Message 34 of 47
(1,944 Views)

Chee_Teck wrote:

May I know if there are any ready ones? I am a beginner at html and JavaScript where any simple example will be most helpful.

No, sadly 😞

There are only the Objective-C examples. The two resources for learning JavaScript with REST APIs that I recommend are:

  1. http://rest.elkstein.org/2008/02/using-rest-in-javascript.html
  2. http://www.codecademy.com/courses/javascript-beginner-en-EID4t/0/1?curriculum_id=5122e6f8b2cb8a8e970...
Joe Friedchicken
NI Configuration Based Software
Get with your fellow OS users
[ Linux ] [ macOS ]
Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
0 Kudos
Message 35 of 47
(1,944 Views)

Hello,

I ran into a problem when I tried to use IPhone to display the data from cDAQ-9191 with a NI 9215 modulus. I downloaded the NI cDAQ-9191 App from Apple store. I updated the firmware to the special version 1.2.10f2 according to the instructions from the forum. I set up an ad-havoc network using the 9191 chassis. My Iphone could detect and connect to the device. However, In the device setting of the APP, it showed "Unsupported device (cDAQ-9191 serial No.).   I clicked the device. The error message was invalid firmware. Did anybody run into the same problem? What should I do to solve the problem? Any advices are highly appreciated.

Thanks,

Victor

0 Kudos
Message 36 of 47
(1,944 Views)

Does the web API return the system state correctly?

In Safari, go to your device's IP address with this URL:

192.168.x.x/daqwebapi/1.0/system

When I do this, I see:

{

    "System":    {

        "DevNames":    [{

                "cDAQ1":    {

                    "Chassis.ModuleDevNames":    ["cDAQ1Mod1"],

                    "ProductCategory":    "CompactDAQ Chassis",

                    "ProductType":    "NI cDAQ-9191",

                    "DevSerialNum":    23372198,

                    "FirmwareVer":    18923520

                }

            }, {

                "cDAQ1Mod1":    {

                    "ProductCategory":    "C Series Module",

                    "ProductType":    "NI 9215 (BNC)",

                    "DevSerialNum":    19641630

                }

            }],

        "Tasks":    [],

        "WebService":    {

            "APIVer":    19578882

        }

    }

}

I suspect that you will see something different, and perhaps that will help us see the next step.

Joe Friedchicken
NI Configuration Based Software
Get with your fellow OS users
[ Linux ] [ macOS ]
Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
0 Kudos
Message 37 of 47
(1,944 Views)

Thank you very much for your advice. Here is what I got:

{

        "System":      {

               "DevNames":    [{

                               "cDAQ1":       {

                                      "Chassis.ModuleDevNames":      ["cDAQ1Mod1"],

                                      "ProductCategory":     "CompactDAQ Chassis",

                                      "ProductType": "NI cDAQ-9191",

                                      "DevSerialNum": 25241017,

                                      "FirmwareVer": 18923520

                               }

                       }, {

                               "cDAQ1Mod1":   {

                                      "ProductCategory":     "C Series Module",

                                      "ProductType": "NI 9215",

                                      "DevSerialNum": 19368062

                               }

                       }],

               "Tasks":       [],

               "WebService":  {

                       "APIVer":      19578882

               }

        }

}

The only difference is that I used a NI 9215 with screw terminals. In your case, you used NI 9215 (BNC). Also, I used an ad-hoc connection instead of using a router. Wonder if these differences caused the problem? Another thought is whether the IPhone APP can work with IOS 8 or not. Thanks again.

0 Kudos
Message 38 of 47
(1,944 Views)

NITKR wrote:

The only difference is that I used a NI 9215 with screw terminals. In your case, you used NI 9215 (BNC). Also, I used an ad-hoc connection instead of using a router. Wonder if these differences caused the problem? Another thought is whether the IPhone APP can work with IOS 8 or not. Thanks again.

Since the system service used "cDAQ1Mod1" for "Chassis.ModuleDevNames", it means that the module is supported. If it were a different module (like a 9201), you would see "cDAQ1UnsupportedModule1" instead.

I can also use an ad-hoc connection with the application.

The app does work with iOS 8 -- I use it with iOS 8.2 on an iPad Air. The UI still uses the older iOS 6 look and feel, as you can tell. It hasn't been updated for the iOS 7 visual design language.

The next step is to look for more error details. Once you receive the error message about invalid firmware, use the same /daqwebapi/1.0/system API and inspect it for differences. If you can, tap the "Play" button to configure a measurement and run it once, and then inspect the /daqwebapi/1.0/system API output again. When I do this, I see:

{

    "System":    {

        "DevNames":    [{

                "cDAQ1":    {

                    "Chassis.ModuleDevNames":    ["cDAQ1Mod1"],

                    "ProductCategory":    "CompactDAQ Chassis",

                    "ProductType":    "NI cDAQ-9191",

                    "DevSerialNum":    23372198,

                    "FirmwareVer":    18923520

                }

            }, {

                "cDAQ1Mod1":    {

                    "ProductCategory":    "C Series Module",

                    "ProductType":    "NI 9215 (BNC)",

                    "DevSerialNum":    19641630

                }

            }],

        "Tasks":    [{

                "myTask":    {

                    "Timing":    {

                        "SampTimingType":    "Sample Clock",

                        "SampQuant.SampMode":    "Finite Samples",

                        "SampQuant.SampPerChan":    1000,

                        "SampClk.Rate":    5000

                    },

                    "Channels":    [{

                            "ai0":    {

                                "PhysicalChanName":    "cDAQ1Mod1/ai0",

                                "AI.MeasType":    "Voltage"

                            }

                        }],

                    "State":    "Verified",

                    "Control":    null,

                    "Error":    {

                        "Status":    false,

                        "Code":    0,

                        "Source":    ""

                    }

                }

            }],

        "WebService":    {

            "APIVer":    19578882

        }

    }

}

Joe Friedchicken
NI Configuration Based Software
Get with your fellow OS users
[ Linux ] [ macOS ]
Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
0 Kudos
Message 39 of 47
(1,944 Views)

Thanks you very much for your reply.  The problem happened when I tried to set up the device in the APP. Therefore, I couldn't run the APP using the device. My IPhone can detect the device automatically. The following image is how it looks like in the Settings page of the APP.When I clicked it, the error message popped up as "Device Error   Invalid chassis firmware. Upgrade chassis firmware".  Then, I went to the system page and got the same API output as shown in my last post. By the way, because I used the ad-hoc connection. I couldn't use my IPHone to check the API output. I used my laptop by connecting the cDAQ 9191 to the network with a Ethernet cable.

Have you tried using IPhone for ad-hoc connection?  I tried a different IPhone also running IOS 8. That IPhone couldn't even connect to the device.

IMG_0002.jpg

0 Kudos
Message 40 of 47
(1,944 Views)