LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2 phidgets at the same time, event problem

Solved!
Go to solution

Hi there,

 

Currently I am making a Vibration Analyser to measure transmissibility between 2 masses, therefore i need to measure both masses at the same time with 2 phidgets at the same time. My problem is, when i use only one phidget at a time the program identifies it correctly and measures it just fine, I am using 2 different phidgets, the 1056 and the 1049. But when I plug both at the same time only one event is on, it identifies both but the graphs are not working properly for some reason, and I think its because of the event. I am not very good at Labview, I only made one simple program before so my experience is not very vast. I hope it doesnt need SubVI's!

 

Would appreciate some help from u guys.

Best Regards.

João Pereira

 

0 Kudos
Message 1 of 12
(4,371 Views)

Wanted to Bump this topic and put a picture of the block diagram, I started to work on one of the examples provided here. My problem is still the same, I tried many different things to try to resolve this but like I said my understanding of Labview is basic and would appreciate some help from you.

 

Best regards,

João Pereira.

0 Kudos
Message 2 of 12
(4,316 Views)

Can you share those subVIs as well?  It is hard to debug just a picture.  If you can, zip up your project and point us to which VI is having the problem.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 12
(4,300 Views)

This is the example im working on, from phidget site, the manufacturer of the sensors im currently using.

http://www.phidgets.com/documentation/web/LabVIEWDoc/index.html?event_handler.htm

 

And it was download from here: http://www.phidgets.com/docs/Language_-_LabVIEW#Quick_Downloads under Example Code  (64 bit Windows - same file as LabVIEW library)

The original file can be located on the zip file im sending under \PhidgetsX64\Examples\Spatial , the subsVIs are there too, I only made minor changes in the file that can be found on my first post, I duplicated the content and put it all under one loop then i made few alterations so i could graph the results. The program works fine when i use only either one phidget sensor at a time, and it shows the correct values on the graphs and on the indicators, but... when u plug both of them at the same it all goes to hell. it doesnt show the values correctly since when i move the sensor all stays the same, and it only shows on 1 graph instead of both separately, it does identify both sensors by its serial number correctly but only 1 event led turns on, therefore i believe that the source of the problem is there or something around there. The program doesnt show me any errors or anything i can just tell its not working as intended.

 

Thx for your reply crossrulz,

João Pereira

 

0 Kudos
Message 4 of 12
(4,283 Views)

Nothing immediately catches my eye.  Granted, I haven't looked at it for long at all.  The only thing I can think of at this moment is if the DLL can only handle a single device at a time.  I would recommend contacting the manufacturer about this to get more details of how the DLL works.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 12
(4,275 Views)

Yeah i made a topic on their forum too, but no one replies there sadly, its also harder for you since u dont have the sensors to see for yourself! Anyway i decided to give it a go on this forum, and im glad i did it since at least someone here is trying to help me out 🙂

0 Kudos
Message 6 of 12
(4,269 Views)

Did you try the Multiple Devices information on the phidgets page?  It looks like they do not use the Event VIs for that.

 

I have not looked at any of the VIs, just the web page.

 

Lynn

0 Kudos
Message 7 of 12
(4,247 Views)

Im still trying to figure things out, i asked a college to send me a labview program that he did some years ago and he managed to make it work, im curretly studying his block diagram and try to find some solution. I will post my finding here if i manage to find anything 🙂

0 Kudos
Message 8 of 12
(4,218 Views)

Oh well his program his pretty similar to mine unfortunatly, i asked him if he had any problems like i have and how he solved them, currently waiting for his response, hope he knows, this is being too much time consuming already 😞

0 Kudos
Message 9 of 12
(4,196 Views)

Phidget Support gave me the solution:

 

This appears to be a quirk in the way that LabVIEW handles passing pointers to C.  The pointer is identical in the case where two events of the same type are passed from a single function.  This causes the events to output to the same event.  To get around this you would need to copy SpatialEventCreate.vi, then change the name of the cluster in it from Event to something else (your choice), change the name of the .vi to something else and then use those two subVIs in your program.  You would need to repeat this for each subsequent event of the same type you wish to have.
 
I did as they said and it worked!
Thx for the help here guys:)
 
Best regards,
João Pereira
 
0 Kudos
Message 10 of 12
(4,176 Views)