LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SD6 Teleop issues

Solved!
Go to solution

I believe so. I went into max, right clicked on the cRIO and formatted it. Then I reinstalled all of the software packages. I did see there were more updated versions of everything. 

0 Kudos
Message 21 of 40
(1,344 Views)

Okay, So I ran this VI to check and see if I am getting a connection with the NI 9870, and got the following output. I then unplugged the Motor Controller from the NI 9870, and ran it again, and the output was the same! I had thought that the ASRL::INSTR was the port from the motor controller, but if it is reading it when it isnt connected, its obviously not the case. So,  I have no idea what to do now.

0 Kudos
Message 22 of 40
(1,323 Views)

You are just floundering in the dark now because you aren't listening to what we are saying.

 

That VI just tells you what ports exist on your PC.  It tells you nothing about whether something is connected to it or not.

0 Kudos
Message 23 of 40
(1,321 Views)

I just unplugged the power to the NI 9870, and ran that VI again, and again got the same output. Clearly the NI 9870 isnt working. Anyone have any troubleshooting ideas?

0 Kudos
Message 24 of 40
(1,316 Views)

I thought that VI told me what ports were connected to the Robot. If I go to the NI Max Remote systems, it is giving me the exact same list of connections I had when the NI 9870 was plugged in. Is the NI Max Remote systems not the ports from the robot? When I shut one of those ports down, you would expect it to disappear, correct?

 

I will reconnect it and put a delay in that program now.

0 Kudos
Message 25 of 40
(1,314 Views)

Okay, I updated the VI with a timer, and still get the same error. Although I am not sure that I set up the timer correctly. Ravensfan would that be the correct way to set up a delay?

Download All
0 Kudos
Message 26 of 40
(1,300 Views)

I physically removed the NI 9870 from the cRio, and once again ran the visa find vi, and the NI Max software, and got the exact same set of ports/information as when it was connected. This tells me it was never working properly. Given that many others have used this exact code with no modifications, and that Jason used that code without having to alter it by changing the bytes to read or putting in a delay, it stands to reason that the problem isnt with the code, but the hardware.

0 Kudos
Message 27 of 40
(1,336 Views)

@eephysicspaul wrote:

Okay, I updated the VI with a timer, and still get the same error. Although I am not sure that I set up the timer correctly. Ravensfan would that be the correct way to set up a delay?


There's another arrow shot in the dark.  Put a probe on Bytes at port.  You'll see it is still zero.  Why?  Because the bytes at port is executing the same time that the wait is starting.  The wait will keep the loop from finishing for a second, but the bytes at port will have already occurred.  The whole Timer=0 is ridiculous.  As you can see it is a very large number (the hardware time of how long the PC has been running), it will never be 0 unless the timer rolls over and  you happen to read it at that very millisecond.  The only way your code may work is if you have highlight execution turned on since it will slow the code down a lot.

Take a look at the thousands of serial port questions on the forums.  You'll soon stumble across one of the thousands that show how to do a wait.  Look at Basic Serial Write and Read example within LabVIEW.  (Looks like it was renamed to Simple Serial.vi in LV2013).  While I still think it is a poor example of doing serial communication, it does demonstrate the proper way to Wait before reading the Bytes at Port.

 

Before you mess the the cRIO and this code, have you tried basic troubleshooting?  Tried running code on the PC?  Tried using hyperterminal?  Tried using the device maker's program (if one exists) to see if that can communicate with the device?

 

Are you sure you are using the right kind of cable?  Should it be a null modem and you are using a straight through cable?  Or vice versa?

 

0 Kudos
Message 28 of 40
(1,318 Views)

I used the same type of delay as shown in the Basic Serial Read Write example. I still get the same error 116, although now I am also getting an error -1073807253. I put a probe at bytes at port and the value is 4096, with or without the delay by the way.

Download All
0 Kudos
Message 29 of 40
(1,304 Views)

I agree with Ravens.

 

1. Download Realterm http://sourceforge.net/projects/realterm/ 

2. Get a hold of a USB to serial cable

3. Set Realterm to watch the port that the serial cable generates, then set the baud rate to 115200

4. Connect it to the serial cable for the motor controller. 

 

This wil display on your screen what's coming out of the serial port. 

 

EDIT:// Have you always only had ASRL1 show up in MAX? You should also be seeing ASRL2 - ASRL 5 which are created by the serial card. 

 

If nothing is coming showing up in Realterm and you only see ASRL1, then there's probably something funky going on with that card. Are you sure it's getting proper power?

 

0 Kudos
Message 30 of 40
(1,279 Views)