Author Topic: Where is the reference point of components?  (Read 2740 times)

Offline Marbek_Elektronik

  • PLUS+1 Guru
  • *****
  • Posts: 350
  • Karma: +8/-0
    • Marbek Elektronik
Where is the reference point of components?
« on: March 05, 2014, 01:51:50 PM »
Who knows, where is the reference point of compontents?

For example: "Up/Down Counter"

If I place it from library, the mouse is placed on the lower left input on this component.
So, I think this is the ref.-point.
But, if this is true, the other inputs are read a processing-loop later.

Does anybodey can tell me, what does the compiler do with the timing of this component?
Marbek Elektronik, Dipl.-Ing. Bernd Konrad
Dienstleistung, Entwicklung, Herstellung

Offline Marbek_Elektronik

  • PLUS+1 Guru
  • *****
  • Posts: 350
  • Karma: +8/-0
    • Marbek Elektronik
Re: Where is the reference point of components?
« Reply #1 on: March 05, 2014, 05:04:33 PM »
Now, I was testing a few hours  :(

The result is: Every input seems to have it's own reference-point.
Normally you place the sources of signals left from the inputs. This is the best way.
But sometimes you want a delay of one loop and you place the source right of the input.
So, I suggest, place it right ot the last input of this module. Otherwise the behavior would be undefined.

I have attached an example:
What do you think happens, if you set the line "1" ? You will get a "5"on "Test" and for one loop is "SW1" high.
So, the 2 upper inputs of the component "counter" is read in the same loop as you set the line "1".

If you the line "2" you will get a "-10" and no signal on SW2.

I can't understand, what the compiler is doing here.

Marbek Elektronik, Dipl.-Ing. Bernd Konrad
Dienstleistung, Entwicklung, Herstellung