Announcement

Collapse
No announcement yet.

CLICK Software: How to use variables?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts


  • CLICK Software: How to use variables?

    [SOLVED]
    Hi I'm new to the CLICK software and I'd like to know if I can use variables within a program. For my example, I'd like to make it so that an the input from an ultrasonic sensor changes the value of variable integer, which can then be checked later on in the program. It looks like the DS addresses could be what I'm looking for, but when I place an output coil the only options are Y, C, and SC. Please help!

    ​Thanks
    [SOLVED]
    Last edited by Austin K; 07-28-2016, 11:07 AM.


  • #2
    Is the ultrasonic sensor signal analog or digital? If analog, VOLT of MILLIAMP?
    How do you need to respond to the signal?

    Comment



    • #3
      Originally posted by kewakl View Post
      Is the ultrasonic sensor signal analog or digital? If analog, VOLT of MILLIAMP?
      How do you need to respond to the signal?

      Analog and milliamp, I know the basics of how to use it to output to the digital ports on the PLC like Y1. Instead I think I need it to output to a Data Register address such as DS1. An example would be if the ultrasonic sensor reads a value greater than 500mm, change DS1 from 0 to 3.

      Comment



      • #4
        Code:
        / 
        /                    UltrasonicVal      Limit
        /-----------------------------------] <= [-----------------------------+ COPY
        /                                                                      | SRC     0
        /                                                                      | DST     DS1
        /                                                                      +-------------
        /                    UltrasonicVal      Limit
        /-----------------------------------]  > [-----------------------------+ COPY
        /                                                                      | SRC     3
        /                                                                      | DST     DS1
        /                                                                      +-------------
        /
        Last edited by kewakl; 07-28-2016, 10:57 AM.

        Comment



        • #5
          Thanks so much!

          Comment

          Working...
          X