Autor Thema: FRMP_B module dependencies  (Gelesen 5584 mal)

0 Mitglieder und 1 Gast betrachten dieses Thema.

fcamisa

  • Gast
FRMP_B module dependencies
« am: 04. November 2012, 16:57:16 »
Hi,

I am trying to port OSCAT Building Automation to my PLC (made by B&R Automation).

In the module FRMP_B i find:
IF TD < TR THEN
FRMP_B := MIN(DWORD_TO_BYTE(SHL(TIME_TO_DWORD(TD), 8) / TIME_TO_DWORD(TR)), SEL(DIR, START, BYTE#255 - START));
There is a refernce to two modules:
- SHL
- SEL
which I cannot find in OSCAT basic and/or OSCAT BA.

I was wondering if they are PLC specific or I am missing something.

Thanks in advance

Francesco

Offline peewit

  • Moderator
  • *****
  • Beiträge: 2 378
    • Profil anzeigen
Re: FRMP_B module dependencies
« Antwort #1 am: 04. November 2012, 17:14:10 »
SEL(A,B,C);      if a=0 output B if A=1 output C
SHL(IN:=A,N:=B);   shift left value A of length B bits

-> standard iec 61131 functions (not a part from oscat)