You just need to turn
Code:
if (limit_switch_active)
{
activate_solenoid_6;
activate_solenoid_7;
}
into real code that compiles.
Replace
limit_switch_active with whatever it takes to read your limit switch. That's something like
Clamplimit->Get(), right? Replace the
activate_solenoid_# with whatever it takes to put your solenoids in the desired state. I don't know how you've instantiated your limit switch or your solenoids, and I don't know how they are wired, so I can't give you working code to copy and paste.
I assume you'll want some way to open the claw later, right?