Math and Memory Examples

These examples are provided to demonstrate certain functions using FACTS BASIC Modules. If you download and use any of these example programs, It is your responsibility to test and modify the program to meet your application requirements.

 

  • Read 24 Analog Input Values starting at V1400 and 8 Analog Output Values starting at V1430 every 10 minutes and log them into BASIC Memory.

There will be a dedicated portion of memory for each 10 minute period containing an Hour/Minute Label and all Analog Input/Output values for that ten minute period.

abmlog.abm (F4-CP128-1)

 

  • Example showing one way to use the F0-CP128 as memory expansion for a DL-05 or DL-06 PLC.

 V3000 specifies a block number between 0 and 127. 128 blocks * 256 bytes each = 32768 bytes or 16384 words.

C100 triggers a data copy from V2000-V2177 to specified block number in the F0-CP128.

C101 triggers a data copy from the specified block number in the F0-CP128 to V2000-V2177.

 F0_memory_expansion.abm (F0-CP128)

 

  • Calculate Standard Deviation on an Array of Numbers

stan_dev.abm (Not Module Specific)

 

  • Calculate Modulus of two Numbers

modulus.abm (Not Module Specific)

 

 

×