MrPLC Member
  • Content count

  • Joined

  • Last visited

Community Reputation

5 Neutral

About leon78

  • Rank
  • Birthday 06/28/78

Contact Methods

  • Website URL http://
  • ICQ 174331215

Profile Information

  • Location Russia

Recent Profile Visitors

4888 profile views
  1. MinutesHours := BCD_TO_INT(%SW51); Hours := INT_TO_REAL(MinutesHours/100); Minutes := INT_TO_REAL(MinutesHours MOD 100);
  2. See help about %SW51 %SW51 = 16#HHMM
  3. The Standby PLC have IP address + 1. For example, for the primary and for the standby. Maybe you write data to the standby, and the primary rewrite it every scan. I think both the PLC are standby if you remove CHS card and you can write data.
  4. Concept V2.2 SP2

  5. I am sorry and I apologize... Another moderator informed me that that was link to updates only and that those are free... Your status is restored and warning is removed.




  6. Concept V2.2 SP2

    (deleted  - was moderator mistake)
  7. Concept V2.2 SP2

    You need *.asc file for import to other version of Concept.
  8. Exuse me, but I have C code only with Russian comments: {       UINT i;     UINT uTemp;     UINT uPriorMax;     *pLastPollErr = FALSE;         //ОПРЕДЕЛЕНИЕ ПРИОРИТЕТА     if (*pAbort || AliGetProgState()->coldInit || AliGetProgState()->warmInit)     //Требуется прервать опрос     {         //Остановка опроса при необходимости         *pStart = FALSE;         *pDev_Num_poll = 0;         for (i = 1; i <= *pDev_Num; i++)         {              //Выставить приоритет             (*pVar)[i-1].Prior = (*pCnst)[i-1].Prior_Beg;              //Сбросить состояние             (*pVar)[i-1].Stat = 0;         }     }     else     {         for (i = 1; i <= *pDev_Num; i++)         {             //Сбросить флаги завершения опроса             (*pVar)[i-1].Stat &= ~(MBP_POLL_SCAN_OK | MBP_POLL_SCAN_ERR);             if ((( (*pVar)[i-1].Stat & MBP_POLL_RUN ) == 0) && (*pVar)[i-1].Prior != 0)             //Устройство требуется опрашивать и оно не опрашивается             {                 //Увеличить приоритет опроса                 if ((*pVar)[i-1].Stat & MBP_POLL_LAST_OK)                     uTemp = *pSys_Time_Delta_100 * (*pCnst)[i-1].PriorAdd_Ok;                 else                     uTemp = *pSys_Time_Delta_100 * (*pCnst)[i-1].PriorAdd_Err;                 if ((*pVar)[i-1].Prior < 0xFFFF - uTemp)                     (*pVar)[i-1].Prior = (*pVar)[i-1].Prior + uTemp;                 else                     (*pVar)[i-1].Prior = 0xFFFF;             }         }     }     //РАБОТА С УСТРОЙСТВАМИ     if (!*pXXMIT_Activ  && !*pAbort)     //Блок XXMIT не запущен     {         if (*pStart && *pDev_Num_poll)         //Ранее отпрашивалось устройсво         {             (*pVar)[*pDev_Num_poll-1].Stat &= ~MBP_POLL_RUN;             if (!*pXXMIT_Code_Err)            //Опрос завершился без ошибок             {                 (*pVar)[*pDev_Num_poll-1].Stat &= ~(MBP_POLL_SCAN_ERR | MBP_POLL_LAST_ERR);                 (*pVar)[*pDev_Num_poll-1].Stat |= MBP_POLL_SCAN_OK | MBP_POLL_LAST_OK;                 (*pOK_Count)[*pDev_Num_poll-1] ++;             }             else            //Опрос завершился с ошибкой            {                    //Код ошибки                 (*pErr)[*pDev_Num_poll - 1] = *pXXMIT_Code_Err;                 (*pVar)[*pDev_Num_poll-1].Stat &= ~(MBP_POLL_SCAN_OK | MBP_POLL_LAST_OK);                 (*pVar)[*pDev_Num_poll-1].Stat |= MBP_POLL_SCAN_ERR | MBP_POLL_LAST_ERR;                 (*pErr_Count)[*pDev_Num_poll-1] ++;                 *pLastPollErr = TRUE;                 *pLastPollErrCode = *pXXMIT_Code_Err;                 *pLastPollDev = *pDev_Num_poll;            }            //Выставить приоритет            (*pVar)[*pDev_Num_poll-1].Prior = (*pCnst)[*pDev_Num_poll - 1].Prior_Beg;         }         //Поиск следующего опрашиваемого устройства         uPriorMax = 0;         uTemp = 0;         *pDev_Num_poll = 0;         *pStart = FALSE;         for (i = 1; i <= *pDev_Num; i++)         {             if ((*pVar)[i-1].Prior > 0 && (*pVar)[i-1].Prior > uPriorMax)             //Требуется опрос устройства и у него более высокий приоритет             {                 uPriorMax = (*pVar)[i-1].Prior;                uTemp = i;             }         }         if (uTemp)         //Найдено устройство, требующее опроса         {                 //Запуск нового опроса             (*pVar)[uTemp-1].Prior = 0;             *pXXMIT_Command =(*pXXMIT_PAR)[uTemp - 1].Command;             *pXXMIT_MsgLen =(*pXXMIT_PAR)[uTemp - 1].MsgLen;             *pXXMIT_Port =(*pXXMIT_PAR)[uTemp - 1].Port;             *pXXMIT_Baudrate =(*pXXMIT_PAR)[uTemp - 1].Baudrate;             *pXXMIT_Databits =(*pXXMIT_PAR)[uTemp - 1].Databits;             *pXXMIT_Stopbits =(*pXXMIT_PAR)[uTemp - 1].Stopbits;             *pXXMIT_Parity =(*pXXMIT_PAR)[uTemp - 1].Parity;             *pXXMIT_RespTour =(*pXXMIT_PAR)[uTemp - 1].RespTour;             *pXXMIT_RetryLmt =(*pXXMIT_PAR)[uTemp - 1].RetryLmt;             *pXXMIT_StartDly =(*pXXMIT_PAR)[uTemp - 1].StartDly;             *pXXMIT_EndDly =(*pXXMIT_PAR)[uTemp - 1].EndDly;             for (i = 1; i <= 5; i++)                 (*pXXMIT_MsgOut)[i - 1] =  (*pXXMIT_PAR)[uTemp - 1].MsgOut[i-1];             (*pVar)[uTemp - 1].Stat |= MBP_POLL_RUN;             *pDev_Num_poll = uTemp;             *pStart = TRUE;         }     }     return; }  
  9. Hi! I think you must use only one instance of the XXMIT block. Please, read help: 'Several XXMITs can not be activate at the same time. If more than one XXMIT is activated, the first scanned block will operate and prevent operation of all other XXMITs until it has completed. The next block in the scan that is called will generate an immediate fault code 150' Many time ago I had wrote a block for Concept. The block is manager for XXMIT. http://forums.mrplc.com/index.php?/files/file/271-management-of-the-block-xxmit/
  10. This is not possible. You must use mask for your case:   FOR (WordIndex :=0 TO 63) DO   FOR (BitIndex :=0 TO 15) DO       wMask := SHL(16#0001, BitIndex );      IF A[WordIndex] AND wMask  NE B[WordIndex] AND wMask  THEN         B[WordIndex] :=(B[WordIndex] AND NOT wMask) OR (A[WordIndex] AND wMask) ;         Res := (WordIndex*16) + BitIndex;         (other stuff) ;      END_IF;   END_FOR;END_FOR;
  11. Hi Leon, this is Arde. I posted a link to my Concept 2.2 project files on the original post. Can you please convert to an ASCII file and send them to me?

    I really appreciate your help!

    Thanks, Arde

    1. leon78


      Hi, Arde.

      I am so sorry, but I did not open this site early.
      Do you need help for convert?

  12. Hi! I can try to help you. I have Concept 2.2 and I can export your project to ASCII file.
  13. Hi Atticuss, The Quantum Hot Stanby PLC has 3 modes: Primary, Standby, Offline. You can see it on a LCD display. If your PLC has connect with IO drop(s), and did start first, it is Primary. If your transfer project from Primary PLC to other PLC, other PLC is Standby. If your PLC has no connect with IO drop(s) after start or see other Primary PLC after start and has different project in memory, it is Offline
  14. The  PLC  scan IO in the Primary mode only. What is mode of your PLC?