How to read output relay state on TNG script

Results 1 to 2 of 2

Thread: How to read output relay state on TNG script

  1. #1
    Member SkiPatrol's Avatar
    Join Date
    May 2019
    Posts
    14
    Downloads
    0
    Uploads
    0

    Post How to read output relay state on TNG script

    I am in the process of writing a TNG script that needs to evaluate the state of two output relays. As an example, relay 1 and 7 need to be confirmed as on/off at the hardware level in order for the script to do something.

    Reading the state of inputs under M67 is no problem given that Q is used to store the values ... but in the case of outputs under M62 ... Q is used differently and I have yet to figured out how to reference individual pins using #<_hw_output>

    Any help with the syntax would be much appreciated.

    Similar Threads:


  2. #2
    Moderator PlanetCNC's Avatar
    Join Date
    Mar 2017
    Location
    Slovenia
    Posts
    248
    Downloads
    0
    Uploads
    0

    Default Re: How to read output relay state on TNG script

    Perhaps this example will help.

    Code:
    #<_TEST1> = [AND[#<_HW_OUTPUT>,1] GT 0]
    #<_TEST2> = [AND[#<_HW_OUTPUT>,2] GT 0]
    #<_TEST3> = [AND[#<_HW_OUTPUT>,4] GT 0]
    #<_TEST4> = [AND[#<_HW_OUTPUT>,8] GT 0]
    (PRINT,1:#<_TEST1,0> 2:#<_TEST2,0> 3:#<_TEST3,0> 4:#<_TEST4,0>)
    Let me know if you need more explanation



Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

How to read output relay state on TNG script

How to read output relay state on TNG script