HI! I Have one DMC-1812 and I Need Get and Set Digital Inputs and Outputs with MFC v6.0.... Can You Help Me Please....??? Thanks... Comments 6 Galil_DJR on 03/23/2009 - 09:07 I assume in Visual Studio C++, 6.0? You can use the GalilTools Communication Library to do this: http://www.galilmc.com/support/manuals/galiltools/index.html http://www.galilmc.com/support/manuals/galiltools/library.html http://www.galilmc.com/support/manuals/galiltools/hello.html http://www.galilmc.com/support/software-downloads.php You'll use command() to send Galil commands, and the commands will be @IN[] or TI for interrogating inputs and SB or OP for setting outputs Look up syntax in the command ref: http://www.galilmc.com/admin/rnd/manuals.html Mauricio on 03/26/2009 - 12:44 Yes I Use MFC VS 6.0 (C++) I Try Get Limits Switch with this Code... I Have conected Sensor to ICM-2900 Block 11 RLSX, FLSX but Not Get Ststus.... CString lsGalilResult; int iIdx; for(iIdx = 0; iIdx <= 8; iIdx++) { sprintf(szCMD, "@IN[%d]", iIdx); m_DMCWin.Command(szCMD, cResult3, sizeof(cResult3)); // Get IO General Input 0 (Axis 1) m_DMCWin.GetDataRecordByItemId(DRIdGeneralInput0, DRIdAxis1, &DataType1, &data1); lsGalilResult.Format("[%d][%s][%d]", (int)data1, cResult3, iIdx); m_GalilRevLbl.SetText(lsGalilResult); } Mauricio on 03/26/2009 - 14:11 I Try Get Limits Switch with this Code... I Have conected Sensor to ICM-2900 Block 11 RLSX, FLSX but Not Get Ststus.... CString lsGalilResult; int iIdx; for(iIdx = 0; iIdx <= 8; iIdx++) { sprintf(szCMD, "@IN[%d]", iIdx); m_DMCWin.Command(szCMD, cResult3, sizeof(cResult3)); // Get IO General Input 0 (Axis 1) m_DMCWin.GetDataRecordByItemId(DRIdGeneralInput0, DRIdAxis1, &DataType1, &data1); lsGalilResult.Format("[%d][%s][%d]", (int)data1, cResult3, iIdx); m_GalilRevLbl.SetText(lsGalilResult); } Galil_DJR on 03/26/2009 - 17:11 That's the old library... You'll need to use _LFn where n = A - H or _LRn where n= A - H IN, SB, CB, OP, TI are for undedicated I/O Please see your controller command reference for syntax: http://www.galilmc.com/support/manuals.php Mauricio on 03/31/2009 - 09:06 Thanks for help me DJ.... This Commands Works.... char cResult[10] int iResult; m_DMCWin.Command("MG _LFA", cResult, sizeof(cResult)); iResult = atoi(cResult); Galil_DJR on 03/31/2009 - 09:27 I'm glad you got it working! Log in or register to post comments
Galil_DJR on 03/23/2009 - 09:07 I assume in Visual Studio C++, 6.0? You can use the GalilTools Communication Library to do this: http://www.galilmc.com/support/manuals/galiltools/index.html http://www.galilmc.com/support/manuals/galiltools/library.html http://www.galilmc.com/support/manuals/galiltools/hello.html http://www.galilmc.com/support/software-downloads.php You'll use command() to send Galil commands, and the commands will be @IN[] or TI for interrogating inputs and SB or OP for setting outputs Look up syntax in the command ref: http://www.galilmc.com/admin/rnd/manuals.html
Mauricio on 03/26/2009 - 12:44 Yes I Use MFC VS 6.0 (C++) I Try Get Limits Switch with this Code... I Have conected Sensor to ICM-2900 Block 11 RLSX, FLSX but Not Get Ststus.... CString lsGalilResult; int iIdx; for(iIdx = 0; iIdx <= 8; iIdx++) { sprintf(szCMD, "@IN[%d]", iIdx); m_DMCWin.Command(szCMD, cResult3, sizeof(cResult3)); // Get IO General Input 0 (Axis 1) m_DMCWin.GetDataRecordByItemId(DRIdGeneralInput0, DRIdAxis1, &DataType1, &data1); lsGalilResult.Format("[%d][%s][%d]", (int)data1, cResult3, iIdx); m_GalilRevLbl.SetText(lsGalilResult); }
Mauricio on 03/26/2009 - 14:11 I Try Get Limits Switch with this Code... I Have conected Sensor to ICM-2900 Block 11 RLSX, FLSX but Not Get Ststus.... CString lsGalilResult; int iIdx; for(iIdx = 0; iIdx <= 8; iIdx++) { sprintf(szCMD, "@IN[%d]", iIdx); m_DMCWin.Command(szCMD, cResult3, sizeof(cResult3)); // Get IO General Input 0 (Axis 1) m_DMCWin.GetDataRecordByItemId(DRIdGeneralInput0, DRIdAxis1, &DataType1, &data1); lsGalilResult.Format("[%d][%s][%d]", (int)data1, cResult3, iIdx); m_GalilRevLbl.SetText(lsGalilResult); }
Galil_DJR on 03/26/2009 - 17:11 That's the old library... You'll need to use _LFn where n = A - H or _LRn where n= A - H IN, SB, CB, OP, TI are for undedicated I/O Please see your controller command reference for syntax: http://www.galilmc.com/support/manuals.php
Mauricio on 03/31/2009 - 09:06 Thanks for help me DJ.... This Commands Works.... char cResult[10] int iResult; m_DMCWin.Command("MG _LFA", cResult, sizeof(cResult)); iResult = atoi(cResult);
Galil_DJR on 03/23/2009 - 09:07
I assume in Visual Studio C++, 6.0?
You can use the GalilTools Communication Library to do this:
http://www.galilmc.com/support/manuals/galiltools/index.html
http://www.galilmc.com/support/manuals/galiltools/library.html
http://www.galilmc.com/support/manuals/galiltools/hello.html
http://www.galilmc.com/support/software-downloads.php
You'll use command() to send Galil commands, and the commands will be
@IN[] or TI for interrogating inputs
and
SB or OP for setting outputs
Look up syntax in the command ref:
http://www.galilmc.com/admin/rnd/manuals.html
Mauricio on 03/26/2009 - 12:44
Yes I Use MFC VS 6.0 (C++)
I Try Get Limits Switch with this Code...
I Have conected Sensor to ICM-2900 Block 11 RLSX, FLSX but Not Get Ststus....
CString lsGalilResult;
int iIdx;
for(iIdx = 0; iIdx <= 8; iIdx++)
{
sprintf(szCMD, "@IN[%d]", iIdx);
m_DMCWin.Command(szCMD, cResult3, sizeof(cResult3));
// Get IO General Input 0 (Axis 1)
m_DMCWin.GetDataRecordByItemId(DRIdGeneralInput0, DRIdAxis1, &DataType1, &data1);
lsGalilResult.Format("[%d][%s][%d]", (int)data1, cResult3, iIdx);
m_GalilRevLbl.SetText(lsGalilResult);
}
Mauricio on 03/26/2009 - 14:11
I Try Get Limits Switch with this Code...
I Have conected Sensor to ICM-2900 Block 11 RLSX, FLSX but Not Get Ststus....
CString lsGalilResult;
int iIdx;
for(iIdx = 0; iIdx <= 8; iIdx++)
{
sprintf(szCMD, "@IN[%d]", iIdx);
m_DMCWin.Command(szCMD, cResult3, sizeof(cResult3));
// Get IO General Input 0 (Axis 1)
m_DMCWin.GetDataRecordByItemId(DRIdGeneralInput0, DRIdAxis1, &DataType1, &data1);
lsGalilResult.Format("[%d][%s][%d]", (int)data1, cResult3, iIdx);
m_GalilRevLbl.SetText(lsGalilResult);
}
Galil_DJR on 03/26/2009 - 17:11
That's the old library...
You'll need to use
_LFn where n = A - H
or
_LRn where n= A - H
IN, SB, CB, OP, TI are for undedicated I/O
Please see your controller command reference for syntax:
http://www.galilmc.com/support/manuals.php
Mauricio on 03/31/2009 - 09:06
Thanks for help me DJ....
This Commands Works....
char cResult[10]
int iResult;
m_DMCWin.Command("MG _LFA", cResult, sizeof(cResult));
iResult = atoi(cResult);
Galil_DJR on 03/31/2009 - 09:27
I'm glad you got it working!