Jump to content

Isakovic

Privileged Member
  • Posts

    192
  • Joined

  • Last visited

  • Days Won

    13

Posts posted by Isakovic

  1. I never tried it but I don't see a reason why it wouldn't be possible.

    Are you using serial or Ethernet? Set different ports if you are using Ethernet.

    *Edit

    I tried it and it works, two PCs can communicate with the same PLC through UniOPC. I used Ethernet connection with different ports.

  2. Hello,

    When reading timer value as numeric data type (TCL or TPL) the result is always 0, while reading it as a string returns correct value.

    I don't know what's the problem. It probably isn't syntax because OPC reports syntax errors, I tried all numeric data types and the result is always 0.
    Reading value as a string isn't that much of a problem because substrings  for minutes and seconds can be extracted. But when writing the value into PLC some code gymnastics is required which takes time. So my question is can timer values be treated as numeric variables?

    I use "WinLog" SCADA from Sielco, example of tags that I use:
    Transport.TPL0 (this returns 0)
    Transport.TP0 (this returns correct value)

  3. On 26.9.2016. at 8:24 AM, vamalgise said:

    I have seen the example, thank you. 

    So it is not necessary to actually have a physical feedback from the valve? i do not really understand how to implement the virtual position.

    Your valve takes 150s to fully open/close, in the example 1/10 of a second is used to measure valve position, so its position will be between 0 and 1500. In the PID loop 1500 will be max output  (fully opened valve).

    PID output is compared to register that contains virtual position. If PID output is higher than virtual position you open the valve to make this two values equal. While PLC output for opening the valve is active you increment virtual position register every 100ms, while PLC output for closing is active you decrement the same register every 100 ms (SB7).  So virtual position changes every time you open/close the valve.

    I don't know how better to explain this concept but the example is very good. It has solved problems for dead band (valve won't move for values less than 1 second) and end positions (in position 0 and 1500 PLC output for opening/clossing remains active for extra 2 minutes to be sure it's in the right position).

    Before I started using this method I made some logic that opened and closed valve based on the error. It used pause and active time, if temperature is much lower than setpoint - open valve for, let's say, 3 seconds every 30 seconds, if it's few degrees under open for 1s every 45 seconds, +/-0.5 degrees around setpoint don't do anything. This could be made functional but it always oscillated.

    Some PLC manufacturers have function block for three point valve control, maybe it could be implemented in VisiLogic in the future, just a sugestion . It makes life much simpler in these situations.

    • Upvote 1
  4. There is an example for PID loop in U90 ladder called "PID with motorized valve". You should check it out.

    Idea is to have a register that will contain virtual "position" of the valve expressed in 1/10 of a second (you need to know time it takes for valve to fully open from closed position, this will be PID max output). You will then compare this value with the PID output, if it is smaller than PID you open the valve, if it's larger you close it. You should have a small deadband.

    If output for opening the valve is active you increment virtual position register every 10ms (SB7). If output for closing is active you decrement it.

    I used this before with Vison and Jazz controllers and it works well.

    • Upvote 2
  5. On 1.9.2016. at 9:28 AM, Isakovic said:

    I had a similar problem with V700 just stopping Ethernet communication.

    It wouldn't communicate with SCADA through UniOPC and couldn't be accessed by VisiLogic from any port. It responded to pings. Socket status was the same as with Joe's case, 23 when it locked, 20 after restart. It happened after 20 or so days of continuous work.
    It started working again after everything was restarted.

    I never had any problems with controllers that require Ethernet cards.

    It happened again.

    It's locked and socket status is 20 on all three ports I use. Still responds to pings. SB 154 and 167 for Ethernet errors are 0.
    How would code for resolving this look like? I think of something like: If status is 20 for 5 minutes, close the socket and init again in next scan.

  6. I had a similar problem with V700 just stopping Ethernet communication.

    It wouldn't communicate with SCADA through UniOPC and couldn't be accessed by VisiLogic from any port. It responded to pings. Socket status was the same as with Joe's case, 23 when it locked, 20 after restart. It happened after 20 or so days of continuous work.
    It started working again after everything was restarted.

    I never had any problems with controllers that require Ethernet cards.

  7. Hi,

    I opened U90 help files by mistake instead of Vision help files , and found that for HSC it says  "Counter value is an integer with a range of -32768 to +32767.  After the counter reaches the maximum value of +32767 it will continue to count in the negative range. "

    I couldn't find similar statement in VisiLogic help files. Now, I plan to use Vision controler V430, and in Technical Specifications for V430-J-TR34 it says that hardware counter has resolution of 32-bit. Does that mean that I can link ML to high speed inputs and they will count to 2^31?

    I am using two shaft encoders if it's of any matter.

    I wasn't even thinking about this question, but since accidentally I looked at U90 help it's been bugging me.

     

×
×
  • Create New...