|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
DIO Signal, Channel, slot, and Vex UltraSonic
Ok, I'm trying to wire up a 8 bit switch up to the DIO of a sidecard that is attached to cRio module 4. The switch is in DIO position 1 & 2. The question I have is, when the context help refers to channel, and slot, what are they reffering to? Also, when we are using the get DIO value vi, it only returns a boolen, what a switch is suposed to do is return a value, right? So, how do I get the value?
Another question we have is, we have a vex ultrasonic sensor atached to DIO 3 & 4, and when we use the get range vi that labveiw supplies(after opening it of course), it always returns 0 in. We have the ultrasonic open outside of our teleop loop & case and the deviceref connect directly to the get range vi within the loop & case. When we turn execution highlighting on, the error wire is returning ok at all points before and after the get range vi. Any help? Last edited by bobwrit : 07-02-2009 at 21:51. Reason: Added another question |
|
#2
|
|||
|
|||
|
Re: DIO Signal, Channel, slot, and Vex UltraSonic
The channel is where on the module you are, basically. There are 16 (right? or close to it) digital channels on each sidecar. They are numbered.
Slot is the slot on the CRio your sidecar is hooked up to. |
|
#3
|
||||
|
||||
|
Re: DIO Signal, Channel, and slot
Bit switches: You need to manually determine the value of the switch. For instance, if you are using just two bits then it follows:
Bit one Bit two False False = 0 True False = 1 False True = 2 True True = 3 something like this. The switches are your DIO inputs. The slot is the module, you probably don't really need to set it and just use the default (module 4). For the channel, right click on the terminal select CREATE then select CONSTANT and select the proper DIO channel (1 or 2?) I've attached some simple logic for 4 bits. There is probably a much more effecient way to do this in LabVIEW than this; but it does work ![]() Sean |
|
#4
|
||||
|
||||
|
Re: DIO Signal, Channel, slot, and Vex UltraSonic
The VEX Range finder works my 'Pinging' and then getting the result based on the amount of time it takes for the Ping to return. So, the process might actually be use the Ping then use the Get Range.
Sean |
|
#5
|
||||
|
||||
|
Re: DIO Signal, Channel, slot, and Vex UltraSonic
We've tried that as well and that didn't work. We think the GetRange function has the ping function somewhere in it.
|
|
#6
|
||||
|
||||
|
Re: DIO Signal, Channel, slot, and Vex UltraSonic
I think the ping.vi must be called. Looking inside the GetRange.vi I don't see anything that is causing the Ping to occurr.
Take a look at this post and see if it helps/hurts. http://www.chiefdelphi.com/forums/sh...RIO+ultrasonic Sean |
|
#7
|
||||
|
||||
|
Re: DIO Signal, Channel, slot, and Vex UltraSonic
When we had ping.vi in the code, the execution order for the sensor was, open, wired to ping, wired to ultrasonic. There is a brach in the wire in between the case and the loop whic leads to the close.vi. We are using update 3 by the way.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Signal wire gauge and color. | sparrowkc | Electrical | 4 | 10-03-2010 19:51 |
| DIO not working in autonomous. | adamdb | NI LabVIEW | 10 | 12-02-2009 01:23 |
| Open motor reference on Slot 6 DIO Module | trilogy2826 | NI LabVIEW | 2 | 27-01-2009 08:42 |
| Using DIO pin 14 as timer source? | Jared Russell | Programming | 1 | 12-02-2006 00:02 |
| Robots and the Learning Channel.... | archiver | 2000 | 0 | 24-06-2002 00:16 |