public void process() {
    if (in != null) {
      double value = 0;

      if (in instanceof VSDouble) {
        VSDouble val = (VSDouble) in;
        value = val.getValue();
      } else if (in instanceof VSInteger) {
        VSInteger val = (VSInteger) in;
        value = (double) val.getValue();
      } else if (in instanceof VSByte) {
        VSByte val = (VSByte) in;
        value = (double) val.toSigned(val.getValue());
        // value=val.getValue();
      }

      if (value != oldValue) {
        panelElement = element.getPanelElement();
        if (panelElement != null) {
          panelElement.jProcessPanel(0, value, (Object) this);
          panelElement.jRepaint();
        }
        oldValue = value;
      }
    }
  }
  public void process() {
    if (start.getValue() == true) {
      if (counter >= to.getValue()) {
        counter = from.getValue();
      }
      started = true;
    }

    if (stop.getValue()) {
      started = false;
    }

    if (delay.getValue() != oldImpuse) {
      oldImpuse = delay.getValue();
      if (timer != null) timer.setDelay(delay.getValue());
    }

    if (reset.getValue() == true) {
      counter = from.getValue();
      outValue.setValue(counter);
      outValue.setChanged(true);
      element.notifyPin(0);
    }
  }
  public void start() {
    timer =
        new javax.swing.Timer(
            delay.getValue(),
            new ActionListener() {
              public void actionPerformed(ActionEvent evt) {
                processX();
              }
            });

    started = false;

    counter = from.getValue();
    outValue.setValue(counter);
    outValue.setChanged(true);
    element.notifyPin(0);

    timer.start();
  }