Naše značky

Impact-Company-Logo-English Black-01-177x54

Vítejte na internetových stránkách společnosti Schneider Electric

Vítejte na našich internetových stránkách.
		
Jak vám dnes můžeme pomoci?
How to manage 16-bit UINT (range 0-65535) variables inside a SoMachine/Machine Expert - Basic application?

The 16-bit variables %MWi are described as WORD, but they always work as INT => signed 16-bit value range (-32768, +32767).
=> this means the value 45000 in a %MW is seen as -20536, and it is not possible to enter any value >32767 from the animation table.

  • For local variables, if we know they are positive values with some maximum >32767 (it’s definition of UINT) then it is necessary to use a 32-bit format %MD instead a %MW into the whole program.

  • For variables (IN/OUT) exchanged with other devices, sometimes there is no choice, the 16-bit format of the variable is defined/fixed with the third party device.

Example: The object %MWa is written into the M221 over a Modbus communication, and you need to use this value inside the M221 application, within arithmetic operations.

In that case, it is necessary to use in addition to the initial %MWa, another variable %MDb and an operation to transform the %MWa into %MDb by keeping the initial positive UINT value.
For that purpose, you have to use the following operation:
%MDb := CONCATW (%MWa, 0)              // it’s forcing the upper word being 0
Result is :

If %MWa=2000;  then %MDb=2000

If %MWa=45000 (-20536 seen n the animation table);  then %MDb=45000

Schneider Electric Česká republika

Zjistěte více
Řada:
Zjistěte více
Řada:

Potřebujete pomoc?

  • Nástroj pro výběr produktů

    Rychle a snadno vyhledávejte správné produkty a příslušenství pro vaše aplikace.

  • Získejte nabídku

    Poptejte nás online a náš lokální specialista se s vámi spojí!

  • Kde nakoupit?

    Jednoduše najděte nejbližšího distributora výrobků Schneider Electric ve vašem okolí.

  • Centrum nápovědy

    Zdroje podpory pro všechny své potřeby najdete na jednom místě.

  • Dokumentace k produktům
  • Software ke stažení
  • Nástroj pro výběr produktů
  • Hledání náhrady za produkty
  • Centrum nápovědy a kontakty
  • Najít naše pobočky
  • Získejte nabídku
  • Kde koupit
  • Profil společnosti
  • Nahlásit nevhodné chování
  • Přístupnost
  • Newsroom
  • Investoři
  • EcoStruxure
  • Vyhledávání pracovních míst
  • Blog
  • Zásady ochrany osobních údajů
  • Oznámení o souborech cookie
  • Podmínky použití
  • Změnit nastavení souborů cookie