Showing results 1 to 8 of 8

Thread: send value to hardware

  1. #1
    dak2483 Gast

    Default send value to hardware

    When i use the function send value to the hardware, is it possible to do so incase my value is the positon i.e. the X co-ordinate of the variable and send it to the PLC.In my case i need to continuously monitor the x co-ordinate of the moving variable and read this value to make changes in my plc program.

  2. #2
    Join Date

    Default Re: send value to hardware

    A good way to send continously the value of one variable to a plc variable is to use allocations. The allocation in zenon is executed spontaneous.

  3. #3
    dak2483 Gast

    Default Re: send value to hardware

    Hey mark

    I appreciate your response. I have used allocations. But that only incase of sending a value associated to the variable but i wish to send the position of the variable.How do i do that?

  4. #4
    flajoso Gast

    Default Re: send value to hardware

    i don't know if i understood your question correctly... why don't you try to use an auxiliar variable (internal) in the allocation that holds the address you want.. and treat it outside the allocation?

    Best regards,

  5. #5
    dak2483 Gast

    Default Re: send value to hardware

    My question would be that is it possible to monitor the co-ordinates of a moving object and assign a variable to the co-ordinates so that i could send this value to the hardware.

  6. #6

    Default Re: send value to hardware

    Could you please explain, what you mean with "moving variable" resp. "moving object"?

    Is this a element (e.g. rectangle, or numerical value, etc) in a zenon picture, which is being moved through dynamics?

    If yes, this element most probably has a variable linked at the property "x-position dynamic". Also it is configured the max. variable value, the min. variable value, and the min. movement and max. movement in pixel.

    e.g. if the static x-position of the element is 10, the min. variable value for the dynamic x-position is 0, the max. variable value for the dynamic x-position is 100, and the min. / max movement in pixels is from 0 to 100, your x-position of the moving object, would the variable value linked at the dynamic x-position of the object, + the static start x-position of the element "10".

    You could e.g. use a variable from the mathematics driver, to add the the static start x-position and the value of the variable for the dynamic x-position.

    To get this value in the PLC, you could use an allocation with the mathematics variable (outcome of the calculation) as the source, and the PLC variable as the target.

  7. #7
    dak2483 Gast

    Default Re: send value to hardware


    that is exactly what my question is.It is an element ( say a rectangle).But using a variable from the mathematics driver, I can just use the value associated with the rectangle and not its x-position. I hope you understanding my question now. I want to continuously monitor the x-position of that rectangle and send this x-position to the hardware( plc).


  8. #8

    Default Re: send value to hardware

    So if you are moving an element (x-position), say a rectangle, you are using dynamics in order to achieve this.

    For the object to move, you will have to link a variable. The value of this variable corresponds to the movement of the object. As described in my previous post, you can calculate the current x-position of the object, through the variable value for dynamics, the x-starting point (the x-point where the rectangle is drawn in the editor) and the settings configured for the x-movement for this rectangle, using a variable of the mathematics variable. As soon as the rectangle is moved again, the calculation is executed again.

    The result of the calculation is the value of the mathematics driver variable. You can use an allocation to assign this value to a variable in the PLC.

Similar Threads

Posting Rules

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