Exemple #1
0
void GPxi6535_DioModule::CreateSubDevicesChannels()
{
	QStringList listStrDo = NiToQString(NiDevice().GetPhysicalChannels(DAQmxPhysicalChannelTypeDOLine, DAQmxPhysicalChannelAccessExternal));
	QStringList listStrDi = NiToQString(NiDevice().GetPhysicalChannels(DAQmxPhysicalChannelTypeDILine, DAQmxPhysicalChannelAccessExternal));
	foreach(QString str, listStrDo) {
		GPxiBasicDigitalOutput* thenewChan = new GPxiBasicDigitalOutput(str, this);
		m_ListDO.append(thenewChan);
	}
Exemple #2
0
GDAQmxModule::GDAQmxModule(QString NiDeviceName)
{
	m_ChassisNumber = 0;
	m_SlotNumber = 0;
	m_NiDeviceName = NiDeviceName;
	try
	{
		CNiDAQmxSystem::LoadDevice(m_NiDeviceName.toAscii());
		m_IsValidDevice = true;
	}
	catch (CNiDAQmxException *exception)
	{
		exception->ReportError();
		exception->Delete();
		m_IsValidDevice = false;
	}
	if(!IsValid())
		return;
	m_ChassisNumber = NiDevice().PxiChassisNumber;
	m_SlotNumber = NiDevice().PxiSlotNumber;
}