I am trying to read the machine position through DNC how can this be done? I am using a Fanuc 0i controller and I want to get the machine position before I start to load the program. Some one told me to send a this line to the controller 'DPRNT[#5001[43]]' but it doesn't seem to work...
I suspect you're experiencing this problem because you are attempting to "DPRNT" back through the same port which received the "DPRNT" command. Don't think that's possible.
To send data during program execution you need to;
A) Place the statement POPEN to open the port before the data you want to send B) Use DPRNT [message # etc.[44]] to send message C) Place statement PCLOS to close the port
You only need use POPEN and PCLOS once but DPRNT is not modal and has to be used on every line of code you want to print.
So using your example it would go like this, ; POPEN; DPRNT[#5001[43]]; PCLOS; ;
I don't know if you can do what you want, from a remote location send and receive at the same time in DNC mode. I have monitored machines remotely, had them send data to the remote locations and have used DNC but I don't remember doing it all in one shot. There are soooo many variables to consider and look at, your machine controller, options enabled on your controller, your Computer Hardware, Comm / DNC Software and the Cable.
PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.