//--------------------------------------------------------------------------- #include #pragma hdrstop #include "PACSDK.h" #include "Unit1.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TForm1 *Form1; //--------------------------------------------------------------------------- __fastcall TForm1::TForm1(TComponent* Owner) : TForm(Owner) { } //--------------------------------------------------------------------------- void __fastcall TForm1::btnReadDIClick(TObject *Sender) { unsigned long DIValue; int TotalChs=StrToInt(etTotalChs->Text ); pac_ReadDI(0,cmbSlot->ItemIndex +1,TotalChs, &DIValue); etDIValue->Text = IntToHex((int)DIValue,TotalChs/4); } //---------------------------------------------------------------------------