Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Java to Crio Downloading Issues (http://www.chiefdelphi.com/forums/showthread.php?t=100200)

austin1743 11-02-2012 20:47

Re: Java to Crio Downloading Issues
 
i have 2 different ip address. one for the cRio and one set for the laptop.. should they be set to the same exact thing?

subnet is set just as it should be... the (255.255.255.0)

jesusrambo 11-02-2012 20:55

Re: Java to Crio Downloading Issues
 
Quote:

Originally Posted by austin1743 (Post 1124625)
i have 2 different ip address. one for the cRio and one set for the laptop.. should they be set to the same exact thing?

subnet is set just as it should be... the (255.255.255.0)

No, not the same thing, but on the same range, and make sure the cRIO's is 10.xx.yy.2

austin1743 11-02-2012 21:29

Re: Java to Crio Downloading Issues
 
ok cool,

i have the cRio at 10.17.43.2

and the computer at 10.17.43.5 (i believe)


what is the correct range?

jesusrambo 11-02-2012 23:53

Re: Java to Crio Downloading Issues
 
Yep, that looks right.

Check firewalls and what network device the driver station is using. Can you ping the CRIO?

LukeS 12-02-2012 11:34

Re: Java to Crio Downloading Issues
 
Quote:

Originally Posted by austin1743 (Post 1124651)
ok cool,

i have the cRio at 10.17.43.2

and the computer at 10.17.43.5 (i believe)


what is the correct range?

By range, he means the same IP subnet.

How IP subnets work is if you look at the IP address and subnet mask in binary, the 1s in the subnet mask mean that that bit of the address is part of the the network address, and 0s in the subnet mask mean that that bit of the address is part of the the node address. So, they are in the same subnet if all of the network bits in the IP address are the same.

So,
Code:

// pseudo-code
// Addresses in binary
cRIO  = 10.17.43.2  ; // 00001010.00010001.00101011.00000010
laptop = 10.17.42.5  ; // 00001010.00010001.00101011.00000101
netmask= 255.255.255.0; // 11111111.11111111.11111111.00000000

// binary and
cRIO_network = cRIO & netmask
laptop_network = laptop & netmask;

println(" > "+cRIO_network); println(" > "+laptop_netowork);
 > 00001010.00010001.00101011.00000000
 > 00001010.00010001.00101011.00000000

println(" > "+(cRIO_network == laptop_network))
 > true

Without doing any binary math, though, if the subnet mask is all 255s and 0s, you can tell easily; 255 means that octet is network, and 0 means node. A mask of "255.255.255.0" means that your range is "10.17.42.*".

austin1743 13-02-2012 15:43

Re: Java to Crio Downloading Issues
 
thanks alot guys for the help. The cRio wasn't imaging correctly because of an IP adress issue that is now fixed :)

now we have a cRio that receives code greatly :)

we are now at another problem.

when we activate tele-op mode our robot doesn't move. I also checked the driver dashboard and i am not getting any pwm input/ output when i move the controller... i know normally i should see the first 4 pwm ports moving when i move the controller. any suggestions?

jesusrambo 13-02-2012 19:06

Re: Java to Crio Downloading Issues
 
Check in the driver station, click the SETUP tab, and look on the right hand side. Look under the tab labeled "Joystick Setup (drag to order)" and make sure at least one of those has a joystick under it. Then make sure it's in the right position. Those positions correspond to joystick values in the code. Press any button on the joystick, and the corresponding one should light up blue in that setup pane.

austin1743 13-02-2012 20:16

Re: Java to Crio Downloading Issues
 
1 Attachment(s)
i will try that tomorrow,

i am looking through the code to make sure i have it working the way it should...

i used a tank drive which works great and the joysticks moves the robot... all but i need mecanum drive to work as we have mecanum wheels on the robot...

i am quite new to programming in general and im not sure i have it set right... i looked at another teams mecanum code and it seem to look very similar... i have attached our code to this message. if someone could take a look at it and let me know what im missing that would be great and amazing.

thanks for the helps guys.


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

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