Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Sensor Issue (http://www.chiefdelphi.com/forums/showthread.php?t=125635)

ROBOGIRL2781 01-02-2014 17:47

Sensor Issue
 
We are trying to program a LV-MaxSonar-EZ1 sensor for distance measurements. We have copied the template and when deployed alone it works fine but when we try to run it with the rest of our code it does not give us any feedback as to if it is working or not. We have an icon on our dashboard that is suppose to move with the distance but shows nothing. Any help would be greatly appreciated!

Invictus3593 01-02-2014 22:48

Re: Sensor Issue
 
Did you copy the code by re-making exactly it in your project exactly how you saw it or did you simply CTR-C, CTR-V? If you CTR-C'd it, try remaking it just how you see it in the example, this will add the needed dependency files to your robot project, rather than just those copied from the other vi.

Also, posting a picture of your code can be very helpful!

blackflame2996 04-02-2014 16:59

Re: Sensor Issue
 
We had this exact problem with the accelerometer vi, make sure it is checking the correct DIO module. It had defaulted to Breakout 2, which was not physically present on our robot. Also, make sure that there are no conflicting functions, such as the one that connects to the dashboard, which are often in the example code. I would recommend simply transplanting the sub-programs within the examples, such as the load and read functions within the main example loop. if you continue having issues, post your code; I would be happy to look over it.

ROBOGIRL2781 04-02-2014 21:43

Re: Sensor Issue
 
1 Attachment(s)
Here is the code that I tried.

Joe Ross 04-02-2014 22:19

Re: Sensor Issue
 
When you copied the front panel controls to teleop, did you make sure the values stayed the same?

ROBOGIRL2781 05-02-2014 12:14

Re: Sensor Issue
 
Quote:

Originally Posted by Joe Ross (Post 1337783)
When you copied the front panel controls to teleop, did you make sure the values stayed the same?

Yes. All values are the same.

ROBOGIRL2781 07-02-2014 16:18

Re: Sensor Issue
 
1 Attachment(s)
Here is a pic of the front panel...I am unsure if there are any other VIs I need to add a front panel to other than teleop...

billbo911 07-02-2014 16:26

Re: Sensor Issue
 
We had this issue when we tried using the "Digital", or "PWM", output. We ended up just choosing to use analog, as you did here.
The one thing to remember about this sensor is, it only samples at a 10Hz rate. Anything beyond that is not getting you any additional data, and may be corrupting your readings..
With the default config, you are sampling it at 1KHz.
Try setting the sample rate down to 10Hz and see how it works.


(We ended up re-building the digital interface and it worked like a charm. I have NO CLUE why it failed previously!)

ROBOGIRL2781 07-02-2014 17:59

Re: Sensor Issue
 
1 Attachment(s)
I edited the code, but its still not functioning

billbo911 07-02-2014 23:57

Re: Sensor Issue
 
Quote:

Originally Posted by ROBOGIRL2781 (Post 1339371)
I edited the code, but its still not functioning

Dividing the value by 9.8 is only off by a factor of 1000.
It should be .0098.

ROBOGIRL2781 08-02-2014 10:47

Re: Sensor Issue
 
I changed the scaling but it still does not show its working...is there specific numbers for the AverageBits and OversampleBits?


All times are GMT -5. The time now is 09:55.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi