LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

webservices and Error -200587 occurred at DAQmx Start Task

Hi,

I am trying to use WebServces to monitor data from a  vi I developed for a college assignment. I have very little experience using labview however I managed to get my temperature measuring and control vi working but when I enter my http address to retrieve data remotely it does show data on the browser however the HMI does not appear and when I run the HMI (the .vi) and change for example temperature set point this change does not appear on my web browser. If I refresh the browser to see if my new set point is shown in the browser I get the error(Error -200587 occurred at DAQmx Start Task.vi:3). So it appears that the error is because there is more than 1 request for data from the DAQ, one from the HMI and one as a result of the browser. Is there a simple way of adjusting the code I already have to fix this or am I way off the mark with what I am trying to do?. I have a screenshot attached and can add vi If required. I have shared variables in my code these are used for when I connect with the NI Dashboard app, for the browser approach I used the connector terminal icon on top right of front panel window. I hope I have explained my problem enough, If not I would be delighted to give more details for anybody that is interested in helping me.

Help would be much appreciated.

Brunswick

0 Kudos
Message 1 of 4
(2,486 Views)

Web services will not show your HMI (VI).  They are simply HTTP communication.  If you want to show your VI in a browser you will need to use Remote Front Panels (Tool > Web Publishing Tool).  I personally find them somewhat brittle and hard to debug, but they are a much simpler way to get what you want.

 

Remember, your web service VIs run when you call them from a browser (aka type in the web address).  So if you have another VI running, accessing shared resources (i.e. your HMI and DAQmx task), they will run into a conflict when your web services tries to access the same thing.

 

Check this article out for a better understanding of how web services work in LabVIEW: Web Services in LabVIEW

Chris
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 2 of 4
(2,476 Views)

Thanks for yor reply Chris. I had remote front panels working and found them easy to set up however I was looking for an additional way of accessing the data (that doesnt require Run Time Engine installed on remote PC). I tried using another VI the exact same except changing the port numbers from Dev1/port0/line3 to Dev1/port1/line3 etc. and adding extra wires from breadboard to new port so I could have one VI for the webservice to access and another VI for me to change set point etc. however still got same error as obviously I cant use the same Dev1 DAQ for both. I was hoping there would be no conflict by using the different ports on the same DAQ. Ah well at least I can use remote front panels unless you think I can get somewhere with my other way?

Thanks Again Brunswick

0 Kudos
Message 3 of 4
(2,463 Views)

You could communicate to your program running on the PC connected to your DAQ from the webservice.  There are several different ways to do this, but for your application it sounds like the easiest might be UDP.

 

Otherwise you are correct; Your HMI will reserve the entire device for that application and your web service (which runs in a different application space) will not be able to also access it.

Chris
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 4 of 4
(2,461 Views)