Reading and Writing TABLE in C

Reading and Writing TABLE in C

double varValue[100];
bool setTable = false;
bool getTable = false;
long lStartPos = 100;
long lBuffSize = 24;

for (int i = 0; i < 24; i++)
{
varValue[i] = i;
}
setTable = TrioPC_SetTable(triopc_context, 0, lBuffSize, varValue);
getTable = TrioPC_GetTable(triopc_context, 0, lBuffSize, varValue);

SetTable takes in a double* array as a parameter, not a VARIANT.

TrioPC_SetTable([context,] startPos, numberElements, arrayOfElements)
TrioPC_GetTable([context,] startPos, numberElements, arrayToStoreElements)
    • Related Articles

    • Reading blocks of data from TrioPC Motion ActiveX or DLL

      The ActiveX and DLL have a way to read blocks of data. The method is called PRMBLK. If you look at he help, it shows you the list. You need to define the type of block you want to read, for example DefineSystem would be used to read system values ...
    • AN-293 C_SPLINE Cardinal Spline command

      Cardinal splines are a type of spline curve that are flexible and easy to apply in motion control applications. The function C_SPLINE allows spline curves to be easily generated in between 2 and 8 dimensions. These curves can used to generate motion ...
    • Trouble with table

      In the MC2xx range of Motion Coordinators, the TABLE is dynamic and the memory shared with the programs. When you first use it, there is no table. TABLE is allocated when it is written tot. You can see the size with TSIZE parameter. If a program ...
    • Is there some method to use a .dll into MC4N-ECAT?

      You cannot import a DLL into the MC4N-ECAT. It has a BASIC compiler and IEC-61131-3 Compiler. The Operating System is a special Trio designed OS with large motion library. If you connect a PC to the MC4N-ECAT using Ethernet, then you can install a ...
    • Motion Perfect problem when SCOPE command is used

      When running the SCOPE command in a program, I think Motion Perfect doesn't like the SCOPE command being issued over and over when I run it. It seems more stable when I comment the SCOPE command out after it's ran once. ...