LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Delay problem

Solved!
Go to solution

Thx for all the effort u took for this kbbersch, I'm going to south Korea to present a machine i made tomorrow and everything is packed atm now, but i will take a rly good look at what u did and put it on my program! My program is working after i made some changes but still it has some delay on it so ur solution will be tried out for sure!

 

Thanks a bunch rly, im not used to getting help and what u did means a lot for me! I'll be back in 5 days and ill post news then!

0 Kudos
Message 11 of 49
(1,609 Views)

I had to borrow the Phidget sensors to my teacher so he could give some classes with them, after i changed my program according to you its still faulty 😞

 

Still i thank u a lot for ur help.

0 Kudos
Message 12 of 49
(1,575 Views)

Any new suggestions would be greatly apreciated! I cant solve this on my own, believe me i tried be4 coming to the forum ...

0 Kudos
Message 13 of 49
(1,563 Views)
0 Kudos
Message 14 of 49
(1,556 Views)

Hi again,

 

After wasting a lot of my time and some of your time also trying to solve the program and the delay, I did a test on the raw example provided by the Phidget website, I left the original program running for just 1 sensor for less than an hour, when i came back to it, the program had delay..... So I made everything starting already on a faulty program that had already that delay problem.... I was so mad but I have to solve this! So i searched for other options and i found an older version of the program no longer provided by the manufacturer, I tested it out and after 2 whole hours the delay was no there on this older version. So now I'm working on that one but i found another problem that I am not able to solve, I can't make it work for 2 sensors at the same time in paralel. The data from both sensors is sent together to both graphs.

 

I know this is my mistake I think, somehow the graphs are calling the data from both sensors when I want it to be separated, one graph showing for 1 sensor and the other one showing the data from the other sensor. Something about the net ref number or something like that. Again I suck in LabVIEW even after learning a lot by trying to do things by myself I cant solve this either. So I am here again asking for your help sadly, but hopefully someone will help me out

I cleaned up the block diagram, and upload the files in the attachments, the pictures and the VI's.

 

Please Help me:( I really need it!

Best Regards and Merry Christmas,

João Pereira

 

 

0 Kudos
Message 15 of 49
(1,522 Views)

bump.

0 Kudos
Message 16 of 49
(1,493 Views)

refnum.png

Do I have to change the Spatial Data Event Callback? In the subVI called onSpatialData? I'm afraid of screwing up things more! But it seems the right place to change the RefNum!

0 Kudos
Message 17 of 49
(1,488 Views)

Bump.

0 Kudos
Message 18 of 49
(1,459 Views)
First, Pardon me if i am telling something stupid.Because i don't know what Phidget is
Now coming to graphs and events.
-You are getting same data in two graphs because you are sending same data to both graphs.
-You are getting from same .NET Refnum, that is the problem ( this is my understanding)
-How about using two loops just same as your current one loop, each corresponds different sensor and then check if it works.
-In the project you added, i can see only onSpatialdata.vi only and where is onSpatialData2.vi? is it same?
-Please keep unregister for events in the right side after while loop is completed.
Thanks
uday
Message 19 of 49
(1,449 Views)

Hello,

 

Phidget is the name of the manufacturer of both sensors and they also name them phidget, the ones im currently using are the phidget spatial 1056 and an older version phidget spatial 1049.

 

-I know that is the problem, the data is being sent to the both graphs at the same time.

-Yes that is why this is happening, same .Net refnum but i dont know how to change or if that is even possible, i found this:spatialeventdata.png

But i think im forced to pick the spatialeventdata, so the refnum will be the same, I was thinking about renaming this or something but i dont know how, i even searched for Phidget21.NET in my computer but the files i found could not be renamed with my knowledge.

 

-I tried using 2 loops but te problem remains, then I tried to use a flat sequence structure on both while loops and I found something nice but it's not what I am looking for, with the flat sequece structure it starts to send the data of just 1 sensor into just 1 graph and when I stop that loop the other loop sends the correct data to the other graph, the problem is that I need them to work at the same time 😞

 

-Yes, the files are the same i simply copy pasted a new one and renamed it, i tried this because I tried a diferent way to do this but there was a delay, its a very long story, but the important part is that the other program had the same problem (data being merged together into 1 graph) and Phidget support told me that i should just rename the blocks and it would work, that it was an ugly way to do this but it should work, and it did.

 

http://forums.ni.com/t5/LabVIEW/2-phidgets-at-the-same-time-event-problem/td-p/2576289/page/2

 

-Ok, thank you I moved the unregister for events to the right side, it was there cuz that's where it was originally.

 

Thanks for the interest uday,

João Pereira.

0 Kudos
Message 20 of 49
(1,433 Views)