‎01-07-2019 08:51 AM
int abcd(void)
{
unsigned char SerialString[25];
int LengthSerialString;
int CheckSum = 0;
int err = 0;
FlushInQ (IBAKA_COMPORT);
FlushOutQ (IBAKA_COMPORT);
SerialString[0]= HEADER_WORD_1;
SerialString[1]= HEADER_WORD_2;
SerialString[2]= MSYNC_KORLEME_BILGILERI_GONDER;
SerialString[3]= MSYNC_GONDER;
SerialString[4]= 0x88; //Checksum
SerialString[5]= '\0';
LengthSerialString = 5;
ComWrt(IBAKA_COMPORT, SerialString, LengthSerialString);
return err;
}
I want to create this function but i can't creat .I can't find how can i define a funtion . I use f(x) expression but because of this "{" parameter ,i get syntax error . I understand how can i define parameters and how can i use flow control arguments but i cant find how can i define a funtion.
‎01-08-2019 02:22 AM
int abcd_Gonder(void)
{
unsigned char SerialString[25];
int LengthSerialString;
int CheckSum = 0;
int err = 0;
FlushInQ (x_COMPORT);
FlushOutQ (x_COMPORT);
SerialString[0]= 1;
SerialString[1]= 2;
SerialString[2]= 3;
SerialString[3]= 4;
SerialString[4]= 0x88; //Checksum
SerialString[5]= '\0';
LengthSerialString = 5;
ComWrt(x_COMPORT, SerialString, LengthSerialString);
return err;
}
I want to send this message using RS232 port. I have to use teststand parameters to create this function. So I can't write this code in visial studio using class librarry to export dll . I'm new at TestStand and I need help that how can I create a function like this.
‎01-08-2019
10:49 AM
- last edited on
‎10-20-2024
05:01 PM
by
Content Cleaner
Is there any particular reason you have to use TestStand parameters to accomplish this? I would imagine it would be very easy to just use to the C/C++ DLL Adapter to use this function you have already written.
There is also the option to create a custom step type for repeated use. The VISA Custom Step Type is an example of this, but either way, you will have to utilize a c/c++ environment at some point.
‎01-09-2019 01:05 AM
My costumer want to edit code and want to be able to adjust itself when parameters change in the future
‎01-09-2019 10:00 AM
The variables/parameters can be created and edited within the TestStand environment and then passed to your functions. The actual code C++ commands will still need to be written externally and called using the C/C++ DLL Adapter. Within TestStand, the functions you have written in the DLL can be selected and utilized within the API.
As far as I know, you can't write/edit C/C++ functions from within TestStand.