Example

The Tc3_PJLink_Sample.zip contains a PLC program to illustrate the use of FB_PJLink. Different commands can be sent to a projector once communication has been successfully established.

Commissioning procedure:

  • The input parameter sProjector must be adjusted to the IP address of the projector that is to be controlled.
  • The input parameter sSecurityPW must match the PJLink password in the projector settings. (Optional: only when PJLink security authorization is enabled.)
  • Set the input parameter bEnable to TRUE to establish communication with the projector.

Comments regarding the program code:

  • Calling FB_PJLink in the pjlink method in the MAIN program:
  • Example 1:
  • Once the connection to a projector has been successfully established, methods can be called in the MAIN program to send commands to the projector:
Example 2:
Example of the power-on command. The command is triggered by setting bPowerExecute.

 

  • If the following error message is logged, the parameter sSecurityPW does not match the security password set for the projector.
Example 3:

Additional notes:

The download contains a TwinCAT project and the compiled library "Tc3_PJLink". This library must first be installed via the library repository. (See https://infosys.beckhoff.com/content/1033/te1000_xae_overview/html/te1000_xae_intro.htm(PLC > Libraries).)

The integrated libraries "Tc2_TcpIp", "Tc3_Module" and "Tc2_Utilities" are required for using the PJLink implementation.