How to Read value of External Axis (INTERCH)?
staBuga
✭
Hello ABB Community,
I am a Student from Porto's University - Portugal.
We've an IRB 2400 with a external "table" IRBc 500kg.
I am trying to develop a program based in C# for the footwear industry.
I need to get some help about reading values from external axis (I only can read correctly the robot's axis).
The code that I'm using for the external axis is :
private void button6_Click(object sender, EventArgs e)
{
MotionSystem motion = c.MotionSystem;
MechanicalUnit mech = motion.GetActiveMechanicalUnit();
JointTarget robb;
robb = mech.GetPosition();
MessageBox.Show(robb.ExtAx.Eax_d.ToString());
}
I've put the reading value returning to a message box, and the value is always "0", even if I move the "table".
Do you have any solution ?
I am thinking that the problem maybe concern in the "GetActiveMechanicalUnite".. but.. how can I select the "INTERCH" unit ?
everything is during Virtual Controller. Further I will test it on the Real controller.
Best Regards,
Nuno Moita
0
Comments
-
Hi Nuno,
Maybe u can use a trap routine in your RAPID code for changing active mechanical unit.When u press button6, set a virtual signal to 1 and catch it with a trap routine.
VAR intnum Ileri;
IDelete tx;
CONNECT Ileri WITH IRBc;
ISignalDO doVirtual,1,tx;
TRAP IRBc
ActUnit INTERCH;
ENDTRAP
And at the end of ur button6_click event reset virtual signal.
Erdem Karaçeper0 -
Hi there,Thanks for the help for the tip. But I've already tried that, calling a Rapid program first with ActUnit Interch, and after to tried to read the value, but it gave me always "0".Further, I found that, changing on the Virtual FlexPendant to the INTERCH and using the following code (similiar to read robot axis number 1) it gaves me the correct value of the external axis (INTERCH).private void button6_Click(object sender, EventArgs e){MotionSystem motion = c.MotionSystem;MechanicalUnit mech = motion.GetActiveMechanicalUnit();JointTarget robb;robb = mech.GetPosition();MessageBox.Show(robb.RobAx.Rax_1.ToString());}So my question is.. how can I using programming code C# change the mechanical unit "ROB_1" to "INTERCH" ?Best Regards, and thanks,Nuno Moita0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 800 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings