VRSTRING 16 bits TrioBASIC Function

AN-389 VRSTRING 16 bits TrioBASIC Function

VRSTRING combines the contents of an array of VR() variables so that they can be printed as a text string or used as part of a STRING variable.

This document explains with an example code.
    • Related Articles

    • Modbus RTU Trio slave

      We have connected many different brands of HMI to the Trio using Modbus RTU on RS232. Typical serial communications setup below. baudrate = 9600 ADDRESS = 1 SETCOM(baudrate, 8, 1, 2, 1, 4) ' 8 bits, one stop bit, even parity The HMI will use Modbus ...
    • Set and Clear bits in TABLE values (Function)

      Here are 2 functions to set and clear a bit in a given TABLE value. ' functions to set and clear bits in TABLE FUNCTION set_table_bit(index, bit AS INTEGER)   DIM pattern AS INTEGER   pattern = 1 << bit   TABLE(index, TABLE(index) OR pattern) ENDFUNC ...
    • Ethernet Modbus TCP VR mapping, ETHERNET function

      Q. I want to compile the existing project and the compiler says it has problems with the ETHERNET command. A. I can see the MC403 which does not work has 2.0268 which is relatively old. The controller that does work has a different firmware version. ...
    • Modbus RTU Holding Registers 40001 ...

      A program has this line: mb_status = MODBUS(3, -1, mbh, $04, addr, 40001, 1, 1) That is for reading the value from the server device. The syntax is value = MODBUS(3, slot, handle, modbus function code[, parameters]) 4 is Read Input Registers, so the ...
    • Moving CAM CSV/Text File to TABLE or VR's location

      The example attached is a Trio basic program that will extract the numerical values of each text file line and move the values into a TABLE or VR array. The program moves the data from the controllers on board memory but can be adjusted to move data ...