|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Is anyone using LabView and can bus?
We are still trying to figure out how to implement can bus using LabView. The example was pretty specific to arcade drive, but I haven't yet clearly understood what the sub VIs do or why. Has anyone out there successfully gotten the can bus to work with LabView?
|
|
#2
|
|||
|
|||
|
Re: Is anyone using LabView and can bus?
Quote:
|
|
#3
|
||||
|
||||
|
Re: Is anyone using LabView and can bus?
Where would one even get sample code for CAD in labview?
![]() |
|
#4
|
|||
|
|||
|
Re: Is anyone using LabView and can bus?
Thanks for fielding this.
For starters, what are the differences in the control modes for the open vi: Percent Vbus, Speed, Position, and current - and how do they relate to the status info that can be read back? Also, can I use the jaguar as a connection point for an encoder without using the sensor to control that particular motor? Finally, if a potentiometer or encoder is connected to the jaguar, what is displayed for the status->speed value? Counts per sec? degrees? Thanks again, Andy |
|
#5
|
|||
|
|||
|
Re: Is anyone using LabView and can bus?
First, let me warn you that the current snapshot is not functional for the closed loop modes. If you check out the latest SVN code, then things should work for you. I fixed some bugs in the last few days so make sure you are up to date.
Quote:
Quote:
Quote:
If you read the position status, then it is based on the position reference that you select (encoder or pot) and the output is the number of rotations. -Joe |
|
#6
|
|||
|
|||
|
Re: Is anyone using LabView and can bus?
Thank you, thank you, and thank you Joe! That helped a lot. Our can bus works now. The only thing that we haven't yet done is write the set/get refnum functions for a single Jaguar. Any idea how to do that? (that is to say, do we try to modify the can library, or write our own from scratch?)
Thanks |
|
#7
|
||||
|
||||
|
Re: Is anyone using LabView and can bus?
Quote:
If you look in the "CANJaguar for LabView" folder from First Forge under "CAN Jaguar - MotorControl", there is a SubVIs folder. One of the files in this folder is called "CAN Jaguar Ref.ctl", and is not a VI, it's a cluster. If you right-click on the front panel, go to "Select a VI..." and double-click this file, it will put a cluster on the front panel. You can then copy this to create an in and an out. If you look at all of the Get and Set RefNum VI's, they're all pretty much exactly the same, except the input clusters are different. You can do the same here. You will need to copy 3 files; "xxxx RefNum Get Set.vi", "xxxx RefNum Registry Set.vi", and "xxxx RefNum Registry Get.vi", where "xxxx" is the new name of your favorite RefNum VI (I used the PWM motor control one). In all of these new VI's, "simply" replace all of the old refnum clusters with the CANJaguar cluster. Remember you will probably have to rewire the terminals on the connector for the VI, and you should also redo the icon a bit so you know what's what. Once you've modified the VI's you copied into your project folder (and not replaced them, never modify VI's that are still IN the standard LabView libraries, you get lots of errors that way), make sure they're added into the project in LabView, under Team Code. You *should* be able to wire them in normally as RefNums now, but let me know if you have any problems. Again, it might just be easier to bundle the RefNum clusters together (make sure to name them descriptively so you can see what's what when you unbundle) and wire them through. And, also again, there will be a refnum VI set in the next CANJaguar release. |
|
#8
|
|||
|
|||
|
Re: Is anyone using LabView and can bus?
Quote:
-Joe |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Anyone have a working can bus sample? | Andy Bradley | NI LabVIEW | 0 | 13-02-2010 01:13 |
| paper: Set and display your Auto-Mode using LabVIEW and the Driver Station | PhilBot | Extra Discussion | 0 | 11-02-2009 12:32 |
| Is anyone using the Labview Dashboard during competition? | programmr | General Forum | 11 | 05-02-2009 17:06 |
| Labview questions, using motor and pot as a servo | martin417 | NI LabVIEW | 7 | 05-02-2009 16:43 |
| Can I use C and labview togther | Chris11246 | NI LabVIEW | 2 | 23-01-2009 18:43 |