**Attention** : Read this resource material carefully and in its entirety before use, to ensure it is understood and used properly. Failure to properly follow the instructions in the resource materials DPAM provides may result in damage to your equipment. As a result, by using the resource materials, you are assuming the risks associated with modifying your equipment. DENSO holds no liability, implied or otherwise, for damage, injury or any legal responsibility incurred, directly or indirectly from the use of the resource materials, including any loss of data or damage to property which may occur by your use of the resource materials. The use of the resource materials are not recommended unless you have technical knowledge and functional experience with the equipment and related software. DENSO is unable to provide support, remote or otherwise, for the information included in the resource material, nor for the ancillary topics relating to the information included in the resource materials. Therefore, if you are not fully comfortable with it, we strongly recommend that you send your unit to one of our Regional Support Centers for repair. The information contained in the resource materials are subject to change at the sole discretion of DPAM.
- Determine which input bits (Port numbers) you want to convert into integer (DINT) format
- Use the DefIO command in your pacscript program to designate the variable type and bit location
Tools and Parts needed
- Full version of Wincaps 3 software.
The different parameters that are included within the DefIO command structure
You can enter almost any name for your tag here. If the tag name you entered is invalid then you will get an error when you check your syntax.
When using this command it designates your “Tag Name” as an Integer data type.
In the above example it will take bit input (port #) 560 – 591 (starting port + 31 bits) and convert it into an integer and place that value into the local tag name you designated.
You can then reference this value through the local variable later in your program or you can transfer it to a Global variable to access in all programs. This copies the value into the Global Integer I20
You can then see the input value under your variable list. You also have the option of putting a mask in if you only want to use a portion of the 32 bits to input into your integer.
Placing the &B designates each bit in the integer to read status (1) or omit status (0). In the above example the top 8 bits of the 32 bit Integer is ignored and the value is determined only by the remaining bits flagged “1”.
When using the mask you must have a “1” or “0” designated for each bit of the corresponding data type.
Masking does not work with Single (Real number) data type
You can also use this Integer conversion with output or internal IO bits. When using a mask with output IO keep in mind it does not actually mask the value of the variable you are referencing , only the value in the actual output bits.