Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   DIO Signal, Channel, slot, and Vex UltraSonic (http://www.chiefdelphi.com/forums/showthread.php?t=73879)

bobwrit 07-02-2009 21:44

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?

Kahn! 07-02-2009 21:51

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.

TimeOut 07-02-2009 22:06

Re: DIO Signal, Channel, and slot
 
1 Attachment(s)
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

TimeOut 07-02-2009 22:12

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

bobwrit 07-02-2009 22:14

Re: DIO Signal, Channel, slot, and Vex UltraSonic
 
Quote:

Originally Posted by TimeOut (Post 816301)
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

We've tried that as well and that didn't work. We think the GetRange function has the ping function somewhere in it.

TimeOut 07-02-2009 22:29

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

bobwrit 07-02-2009 22:34

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.


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

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