A method for determining a locality of a user device for an access control of the user device to an industrial device, wherein the locality of the user device to an industrial device comprises to check if the user device is located nearby the industrial device, the method comprising the steps of: - sending, by the user device, a request for an access to the industrial device to an access system; - generating a passcode by the access system, wherein the passcode is a random number of a predefined length; - sending the passcode from the access system to the industrial device; - communicating the passcode from the industrial device to the user device via a local communication technique, wherein the local communication technique comprises at least one of: a communication via an electric contact between the user device and the industrial device, an acoustical communication technique between the user device and the industrial device, an optical communication technique between the user device and the industrial device, an electrical and/or electromagnetical near-field technique between the user device and the industrial device, an electrical short-range communication technique between the user device and the industrial device, and/or a wireless technique between the user device and the industrial device, combined with a localization technique for both the user device and the industrial device; - sending the passcode from the user device to the access system; and - granting the access to the industrial device by the access system, when the passcode received from the user device is essentially the same as the passcode generated by the access system, wherein essentially the same passcode is the identical passcode or comprising deviations caused by encryption and/or redundancy mechanisms. - sending, by the user device, a request for an access to the industrial device to an access system; - generating a passcode by the access system, wherein the passcode is a random number of a predefined length; - sending the passcode from the access system to the industrial device; - communicating the passcode from the industrial device to the user device via a local communication technique, wherein the local communication technique comprises at least one of: a communication via an electric contact between the user device and the industrial device, an acoustical communication technique between the user device and the industrial device, an optical communication technique between the user device and the industrial device, an electrical and/or electromagnetical near-field technique between the user device and the industrial device, an electrical short-range communication technique between the user device and the industrial device, and/or a wireless technique between the user device and the industrial device, combined with a localization technique for both the user device and the industrial device; a communication via an electric contact between the user device and the industrial device, an acoustical communication technique between the user device and the industrial device, an optical communication technique between the user device and the industrial device, an electrical and/or electromagnetical near-field technique between the user device and the industrial device, an electrical short-range communication technique between the user device and the industrial device, and/or a wireless technique between the user device and the industrial device, combined with a localization technique for both the user device and the industrial device; - sending the passcode from the user device to the access system; and - granting the access to the industrial device by the access system, when the passcode received from the user device is essentially the same as the passcode generated by the access system, wherein essentially the same passcode is the identical passcode or comprising deviations caused by encryption and/or redundancy mechanisms.