Forum
read the tooldata from magazin?
Quote from Andi Freude on January 3, 2022, 2:29 pmHi, is it possible to read out the tool data from the magazine using focas and if so can someone give me an example? Thank you very much!!
thx hookandi
Hi, is it possible to read out the tool data from the magazine using focas and if so can someone give me an example? Thank you very much!!
thx hookandi
Quote from Alex Free on January 3, 2022, 4:19 pmAndi,
The key to what you are trying to do lies in the cnc_rdtool function. This will return a IODBTLMNG structure that should have all of the information about that tool record.
The other that you will need is cnc_rdmagazine. This one will allow you to figure out which tool is associated with which pot. You must use a combination of the two functions in order to get the full picture of which tools and which tool data is associated with particular parts of a magazine.
Please let me know is this is helpful or not. I am happy to go into more detail or I offer consulting if interested to get you through that part of your project.
Alex F.
typedef struct iodbtlmng { long T_code; /* tool number(T) */ long life_count; /* tool life counter */ long max_life; /* maximum of tool life */ long rest_life; /* rest of tool life */ unsigned char life_stat; /* state of tool life */ unsigned char cust_bits; /* customizing bit */ unsigned short tool_info; /* tool info. */ short H_code; /* tool length compensation number (H) */ short D_code; /* cutter compensation number (D) */ long spindle_speed; /* spindle speed(S) */ long feedrate; /* feed rate(F) */ short magazine; /* magazine number(read only) */ short pot; /* pot number(read only) */ short G_code; /* tool geometric compensation number(G) */ short W_code; /* tool wear compensation number(W) */ short gno; /* tool geometric number */ short grp; /* edge group number(only 0i-F, 30i/31i/32i) */ short edge; /* edge number(only 0i-F, 30i/31i/32i) */ short org_magazine; /* origin magazine number(only 0i-F, 30i/31i/32i) */ short org_pot; /* origin pot number(only 0i-F, 30i/31i/32i) */ short reserve_s; /* reserved */ long reserved[2]; /* reserved */ long custom1; /* customizing data 1 */ long custom2; /* customizing data 2 */ long custom3; /* customizing data 3 */ long custom4; /* customizing data 4 */ long custom5; /* customizing data 5 */ long custom6; /* customizing data 6 */ long custom7; /* customizing data 7 */ long custom8; /* customizing data 8 */ long custom9; /* customizing data 9 */ long custom10; /* customizing data 10 */ long custom11; /* customizing data 11 */ long custom12; /* customizing data 12 */ long custom13; /* customizing data 13 */ long custom14; /* customizing data 14 */ long custom15; /* customizing data 15 */ long custom16; /* customizing data 16 */ long custom17; /* customizing data 17 */ long custom18; /* customizing data 18 */ long custom19; /* customizing data 19 */ long custom20; /* customizing data 20 */ } IODBTLMNG;
Andi,
The key to what you are trying to do lies in the cnc_rdtool function. This will return a IODBTLMNG structure that should have all of the information about that tool record.
The other that you will need is cnc_rdmagazine. This one will allow you to figure out which tool is associated with which pot. You must use a combination of the two functions in order to get the full picture of which tools and which tool data is associated with particular parts of a magazine.
Please let me know is this is helpful or not. I am happy to go into more detail or I offer consulting if interested to get you through that part of your project.
Alex F.
typedef struct iodbtlmng { long T_code; /* tool number(T) */ long life_count; /* tool life counter */ long max_life; /* maximum of tool life */ long rest_life; /* rest of tool life */ unsigned char life_stat; /* state of tool life */ unsigned char cust_bits; /* customizing bit */ unsigned short tool_info; /* tool info. */ short H_code; /* tool length compensation number (H) */ short D_code; /* cutter compensation number (D) */ long spindle_speed; /* spindle speed(S) */ long feedrate; /* feed rate(F) */ short magazine; /* magazine number(read only) */ short pot; /* pot number(read only) */ short G_code; /* tool geometric compensation number(G) */ short W_code; /* tool wear compensation number(W) */ short gno; /* tool geometric number */ short grp; /* edge group number(only 0i-F, 30i/31i/32i) */ short edge; /* edge number(only 0i-F, 30i/31i/32i) */ short org_magazine; /* origin magazine number(only 0i-F, 30i/31i/32i) */ short org_pot; /* origin pot number(only 0i-F, 30i/31i/32i) */ short reserve_s; /* reserved */ long reserved[2]; /* reserved */ long custom1; /* customizing data 1 */ long custom2; /* customizing data 2 */ long custom3; /* customizing data 3 */ long custom4; /* customizing data 4 */ long custom5; /* customizing data 5 */ long custom6; /* customizing data 6 */ long custom7; /* customizing data 7 */ long custom8; /* customizing data 8 */ long custom9; /* customizing data 9 */ long custom10; /* customizing data 10 */ long custom11; /* customizing data 11 */ long custom12; /* customizing data 12 */ long custom13; /* customizing data 13 */ long custom14; /* customizing data 14 */ long custom15; /* customizing data 15 */ long custom16; /* customizing data 16 */ long custom17; /* customizing data 17 */ long custom18; /* customizing data 18 */ long custom19; /* customizing data 19 */ long custom20; /* customizing data 20 */ } IODBTLMNG;
Quote from Andi Freude on January 5, 2022, 7:29 amHi Alex,
thank you very much for your fast answer.
Yes, unfortunately I always get an EW_NOOPT (6) with cnc_rdtool what does that mean? Which parameters have to be activated? Do you have a short example maybe?
Thx Andi
Hi Alex,
thank you very much for your fast answer.
Yes, unfortunately I always get an EW_NOOPT (6) with cnc_rdtool what does that mean? Which parameters have to be activated? Do you have a short example maybe?
Thx Andi
Quote from Alex Free on January 5, 2022, 10:48 amAndi,
NOOPT is an error related to the CNC itself, not your code. According to FANUC, these are the required options needed for this function to operate:
This function need the following CNC option.
The Tool management function 64 pairs, or the Tool management function 240 pairs, or the Tool management function 1000 pairs.
And this function is related to the following CNC option.
This function is influenced by the additional customized data on tool management function option(5-20).
The following parameters also are required, BUT they would be required to setup the operation of the magazine itself
13220 (Valid number of Tool management data)
13222 (Number of data for the 1st magazine)
13223 (Starting pot number for the 1st magazine)
13227 (Number of data for the 2nd magazine)
13228 (Starting pot number for the 2nd magazine)
13232 (Number of data for the 3rd magazine)
13233 (Starting pot number for the 3rd magazine)
13237 (Number of data for the 4th magazine)
13238 (Starting pot number for the 4th magazine)
If the machine is operational, I would question does this machine utilize the FANUC tool management functions? It's an option to use it, but the MTB can choose to implement the management themselves, in which we would have a different conversation.
If unsure, I can provide a few checks that would help us narrow down the implpementation.
Alex
Andi,
NOOPT is an error related to the CNC itself, not your code. According to FANUC, these are the required options needed for this function to operate:
This function need the following CNC option.
The Tool management function 64 pairs, or the Tool management function 240 pairs, or the Tool management function 1000 pairs.
And this function is related to the following CNC option.
This function is influenced by the additional customized data on tool management function option(5-20).
The following parameters also are required, BUT they would be required to setup the operation of the magazine itself
13220 (Valid number of Tool management data)
13222 (Number of data for the 1st magazine)
13223 (Starting pot number for the 1st magazine)
13227 (Number of data for the 2nd magazine)
13228 (Starting pot number for the 2nd magazine)
13232 (Number of data for the 3rd magazine)
13233 (Starting pot number for the 3rd magazine)
13237 (Number of data for the 4th magazine)
13238 (Starting pot number for the 4th magazine)
If the machine is operational, I would question does this machine utilize the FANUC tool management functions? It's an option to use it, but the MTB can choose to implement the management themselves, in which we would have a different conversation.
If unsure, I can provide a few checks that would help us narrow down the implpementation.
Alex
Quote from Andi Freude on January 6, 2022, 2:38 amHi Alex,Machines are Makino and Matsuura, both of I get NOOPT.Unforunately I do not know whether the Fanuc tool management is used here. I would be very grateful if you could help me hereAndi
Quote from Alex Free on January 6, 2022, 11:28 amAndi,
I would be happy to assist. My feeling is the scope of this might be outside what we can accomplish in a blog setting.
I would recommend you contact me directly to setup a time for a phone call or remote session to determine the best course of action for your project. My direct email is afree.cnc@gmail.com.
Thanks,
Alex
Andi,
I would be happy to assist. My feeling is the scope of this might be outside what we can accomplish in a blog setting.
I would recommend you contact me directly to setup a time for a phone call or remote session to determine the best course of action for your project. My direct email is afree.cnc@gmail.com.
Thanks,
Alex