Trouble with spike and camera

We are a rookie team working on labview for the first time.

We are having trouble with the camera. We managed to get an image from the camera for a few seconds but it is really blurry. After a few seconds, the image just freezes and our camera does not update the image. Is it a problem with our code or our camera?

Also, we are having trouble with the spike. We are using the spike with our pneumatics to activate a piston. I am not sure how to word this but we are using a double solenoid with our spike…
After copying some examples that we found on the internet, we tested it but our spike does not sense any input.

Any help is greatly appreciated.

Ok, sorry, but i dont know camera code very well, but i am an expert with solenoid code (it is very simple)

Your problem is that you need to control the solenoid through a relay (spike) or the pneumatics slot on your crio. there is an entire slot (9472) devoted to pneumatics, with a blue connector on top that on the side is labeled relay. Ill find a picture after i post this to help you out.

If you control it through a spike, then you are going to have to use relay in your code.

If you control it through solenoid (which is the 9472 slot) then it is your code, except you choose pneumatics board 1 in the other blue slot in the beginning. and your double solenoid needs to have a case structure. Ill make a code for you and post in here once i am done. It is a simple code, probably will take you 10 minutes since you already know where the solenoids are located.

Here is the coding if you are using the 9472.

The slot third from the left is the 9472 with the connector in it. plug in the two pins into the top part, and your 12 volts (assuming you use 12 volt solenoids, if it is 24, connect the relay part of the solenoid slot to 24) and then the code should work.

If you cant get it to work, post a picture of your wiring and i will tell you what you did wrong.

Solenoid begin.jpg

Solenoid begin.jpg

The Spike can only be used to control 12v solenoids.
The Solenoid Breakout can be used for either 12v or 24v solenoids, but you have to choose one voltage. It can’t do both voltages at the same time.

The more typical Kit solenoid, like the double Festo, is a 24v solenoid.

Make sure which type you have.

For the camera, you don’t mention what kind, but the 206 and M1013 have a black bezel on the front that rotates to focus it. You may try adjusting the size and framerate to lower the network usage.

Greg McKaskle

we have an M1013 Camera but it doesnt have a rotational focus on the front.

I don’t have access to that camera, but page four of the manual calls the black ring the focus ring and states that it is a manual focus lens. It also says that it is preset and you don’t need to adjust it unless the image is blurry.

If you post an image taken with the camera, I can give my opinion as to what is causing the blur.

Greg McKaskle

we’re not using the 9472 port so we need to set up a relay… can you help out with that?

There’s a built-in LabVIEW example to tell you everything you need to know.

When you launch LabVIEW you should see the “FRC 2013 Getting Started” window. On the left side of that window are a number of tabs. Select the “Support” tab. One of the options is “Find FRC Examples…” Click it, and the example finder will open.

You want the Relay.lvproj example. It’s in the “Actuators” subfolder under the “FRC Robotics” folder.

Hey, thanks for the great advice. We managed to access the relay file but we don’t understand what the “visible” means… can you please elaborate on this?

I’m sorry, I don’t know what you are referring to.

In the relay example, with in the case structure, there are two blocks that say visible… What are those? And if you don’t see that… Then what in general is in that case structure? -Its called the property node

That case structure is only providing visual feedback on the example’s front panel. It plays games with the LED indicator on the picture of the Spike so it can have more than two states. Don’t worry about it, and certainly don’t copy it to your code.

All you need are the Relay Open and a RefNum Set in, and a RefNum Get and a Relay Set in (or wherever you need to set the state of the relay).

We would like to be able to set the spike so that it goes forward when we click a button and then it reverses when we release the button. How would we go about programming this?

Here’s one way, ignore the name given to it.

How do we create the “Forward” and “Reverse” for the We are getting a boolean input and output and we dont know what to replace it with.

On the Relay Set, right-click on the input node and choose Create -> Constant
Then break the wire and drag and copy/paste it wherever you need to place it.

Here is the camera image btw for the person wondering… It also freezes randomly.

It expects us to put a boolean input (its orange - not blue) - therefore, we get an error when we connect it to the relay set.

Start with a new Select and it will have several orange floating-point nodes and one green boolean node.
The first thing wired to an orange node will change all the nodes to that type color.;base64,iVBORw0KGgoAAAANSUhEUgAAAHcAAADeCAIAAACISAj7AAAGHElEQVR4nO2cUZLjKgxFWd3bVm9w9sT7iBMwSAJjuGBzT7kyHgpLcEyApJM4T8bjZjdgC2gZAS0joGUEtIyAlhHQMgJaRkDLCJ5t2Q2mWzt7BZqCc877UQctH9Aygp/l7JmuWVvY8n8K3nvnEEeN5aLQR1qGKb5jOR7aRqF+V6Za7pW+SL3lfMawVcaFK1rulbuGO2M58Z7fknUtt+SI9p5X96E3LRuF61ouhwvDJJSI57XtGzYvi3XmW476Fh6zPqfnlZa1Ra/S8s1jFctRx+T+5236lMSjOx/p5/rCvqJoeSg1cmqoDRSbzc+9aTkpsbNkN88+uomQGoO1LA6u+rF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