multiple temp sensor

Supporting Labview 2012 and up
Fresh meat
Posts: 3
Joined: Wed Feb 19, 2014 7:35 am

multiple temp sensor

Postby ggpoly » Thu Mar 06, 2014 9:47 am

I'm using the 4-input temperature sensor 1048. The example code only uses one of the inputs, so I've been trying to add more to the code. I want to have two inputs from two different thermocouples. I've tried to add the part outside the while loop and then just change the index to make two different settings. Then I went into the while loop/event structure and just copied it all through to make the two different "chains" of code. When I do this, the "chain" that I added works properly, but the original code from the example doesn't work for the first input. I'm not sure what I need to do, but I think it has something to do with having the two "open" blue boxes. It says error 7013. I also just doubled the whole code, but then I have trouble with the stopping. I'm assuming this second way isn't the proper way to go about it.

Basically what I'm asking is, how do I have the 1048 read two inputs at the same time?

Also, how important is the error line? I delete the error out and the red exclamation point box at the end of the program and it still works fine, but I still need to wire all of the errors together for the rest of the boxes and I'm not sure why.

Fresh meat
Posts: 2
Joined: Wed Oct 22, 2014 5:14 am

Re: multiple temp sensor

Postby Joseline » Wed Oct 22, 2014 5:23 am

It looks like this questions is out of date. But I have the same problem at the moment. Are you already found the solution?

User avatar
Site Admin
Posts: 690
Joined: Fri Oct 28, 2011 12:17 pm

Re: multiple temp sensor

Postby mparadis » Wed Oct 22, 2014 7:30 am

This is a known issue in Labview. From our Labview page in the wiki:

Issue: Events can occasionally cause issues, especially when there are multiple of the same type of event
In other words, if you open 2 Interface Kits and have a sensor change event for each one your system can behave unpredictably. This problem is a quirk in the way that LabVIEW handles passing pointers to C. There are a few solutions to this issue, either:

* Stop using events and simply poll the device. Events work similarly to polling in LabVIEW anyway and should not cause substantial performance changes to your application.

* Implement a simple fix to the events which are causing the problem. The pointer is identical in the case where two events of the same type are passed from a single function. This causes the events in C to output to the same event in LabVIEW. To get around this you would need to copy the offending subVI, then change the name of the cluster object in it from "Event" to something else (your choice), change the name of the .vi to something else and then use those two different subVIs in your program. You would need to repeat this for each subsequent event of the same type you wish to have.

A third solution would be to use a different programming language, since this issue is unique to Labview.

Return to “Labview”

Who is online

Users browsing this forum: No registered users and 2 guests