def Open(self,devname,adr,eosChar=10,eosMode=0x08|0x04): """ Open(gpibdevice,address,eosChar,eosMode) Opens a connected device at the GPIB bus. gpibdevice means the controller, (mostly \"gpib1\"), address the address of the desired device in the range 1...31. The eosChar defines the EOS character (default is linefeed), eosMode may be a combination of bits ORed together. The following bits can be used: 0x04: Terminate read when EOS is detected. 0x08: Set EOI (End or identify line) with EOS on write function 0x10: Compare all 8 bits of EOS byte rather than low 7 bits (all read and write functions). Default is 0x12 For example: dev = wxGPIB() dev.Open(\"gpib1\",17) Opens the device with the address 17, linefeed as EOS (default) and eos mode with 0x04 and 0x08. Open returns >= 0 or a negativ value, if something going wrong. """ self.device = wxctb.wxGPIB() dcs = wxctb.wxGPIB_DCS() dcs.m_address1 = adr dcs.m_eosChar = eosChar dcs.m_eosMode = eosMode result = self.device.Open(devname,dcs) return result
def Open(self, devname, adr, eosChar=10, eosMode=0x08 | 0x04): """ Open(gpibdevice,address,eosChar,eosMode) Opens a connected device at the GPIB bus. gpibdevice means the controller, (mostly \"gpib1\"), address the address of the desired device in the range 1...31. The eosChar defines the EOS character (default is linefeed), eosMode may be a combination of bits ORed together. The following bits can be used: 0x04: Terminate read when EOS is detected. 0x08: Set EOI (End or identify line) with EOS on write function 0x10: Compare all 8 bits of EOS byte rather than low 7 bits (all read and write functions). Default is 0x12 For example: dev = wxGPIB() dev.Open(\"gpib1\",17) Opens the device with the address 17, linefeed as EOS (default) and eos mode with 0x04 and 0x08. Open returns >= 0 or a negativ value, if something going wrong. """ self.device = wxctb.wxGPIB() dcs = wxctb.wxGPIB_DCS() dcs.m_address1 = adr dcs.m_eosChar = eosChar dcs.m_eosMode = eosMode result = self.device.Open(devname, dcs) return result
def Open(self, devname, adr): """ Open(gpibdevice,address) Opens a connected device at the GPIB bus. gpibdevice means the controller, (mostly \"gpib1\"), address the address of the desired device in the range 1...31. For example: dev = wxGPIB() dev.Open(\"gpib1\",17) Opens the device with the address 17. Open returns >= 0 or a negativ value, if something going wrong. """ self.device = wxctb.wxGPIB() dcs = wxctb.wxGPIB_DCS() dcs.m_address1 = adr result = self.device.Open(devname, dcs) return result