Forum
PMC buttons like rapid traverse
Quote from Muhammed Taşdemir on August 26, 2022, 9:07 amHello everyone.
I have been trying to measure the position and value of the rapid traverse button that you have seen in the image for a long time, but I could not succeed. Can you help me
Hello everyone.
I have been trying to measure the position and value of the rapid traverse button that you have seen in the image for a long time, but I could not succeed. Can you help me
Uploaded files:- You need to login to have access to uploads.
Quote from Versex on August 26, 2022, 6:37 pmHi Muhammed,
So for the rapid traverse, you need to read the signal G0.14. To do that you can use the pmc_rdpmcrng() function. Unfortunately, the value that is returned is not the rapid traverse speed. The function returns the switch position which will need to be mapped to the speed. This is what I have for mine. Your mapped values may be different. I hope this helps.
public string GetRapidTraverse()
{
if (Fanuc.Handle == 0)
return "";Focas1.IODBPMC0 m = new Focas1.IODBPMC0();
ret = Focas1.pmc_rdpmcrng(Fanuc.Handle, 0, 0, 14, 14, 16, m);if (ret != Focas1.EW_OK)
return ret.ToString();if (m.cdata[0] == 0)
return "100";
if (m.cdata[0] == 1)
return "50";
if (m.cdata[0] == 2)
return "25";
if (m.cdata[0] == 3)
return "5";
else return "0";
}
Hi Muhammed,
So for the rapid traverse, you need to read the signal G0.14. To do that you can use the pmc_rdpmcrng() function. Unfortunately, the value that is returned is not the rapid traverse speed. The function returns the switch position which will need to be mapped to the speed. This is what I have for mine. Your mapped values may be different. I hope this helps.
public string GetRapidTraverse()
{
if (Fanuc.Handle == 0)
return "";
Focas1.IODBPMC0 m = new Focas1.IODBPMC0();
ret = Focas1.pmc_rdpmcrng(Fanuc.Handle, 0, 0, 14, 14, 16, m);
if (ret != Focas1.EW_OK)
return ret.ToString();
if (m.cdata[0] == 0)
return "100";
if (m.cdata[0] == 1)
return "50";
if (m.cdata[0] == 2)
return "25";
if (m.cdata[0] == 3)
return "5";
else return "0";
}
Quote from Muhammed Taşdemir on August 30, 2022, 1:18 amThank you Versex. I tried your advice and it worked. It's amazing.
I want to ask a question. What it the logic that read to G0.14. signal.
Thank you Versex. I tried your advice and it worked. It's amazing.
I want to ask a question. What it the logic that read to G0.14. signal.