Re: how to send a group execute trigger with python?
Hernán Freschi <[email protected]> Wed, 6 Aug 2025 10:10:01 -0300
| Newsgroups | gmane.linux.hardware.gpib.general |
|---|---|
| Message-ID | <CALruTQeiP0UtYNTABRUhu81ZR6Nym+Eph7m5mqA-JJVdZ8vO8g@mail.gmail.com> |
dave, thanks for your suggestion. it almost worked. the only change I needed to make was to send the payload as a byte array instead of a string that is: replace: string(b) for: bytes(b) cheers El mié, 6 ago 2025, 04:56, dave penkler <[email protected]> escribió: > There is no python binding for TriggerList() but you can do it with > gpib.command(board, string) > where board is the minor of your adapter and string is composed of the > unlisten command UNL 0x3f, the listen addresses of the instruments to > trigger and the GET command 0x08. > For device addresses 4 and 5 you could do something like: > > board = 0 > pad1 = 4 > pad2 = 5 > b = bytearray(4) > b[0] = 0x3f > b[1] = 0x20 + pad1 > b[2] = 0x20 + pad2 > b[3] = 0x08 > string = str(b) > gpib.command(board, string) > > On Wed, 6 Aug 2025 at 06:50, Hernán Freschi <[email protected]> wrote: > >> I'm using the gpib module in python and I've set up a couple instruments, >> a 34401A and a 53131A for external triggers. >> >> then I trigger them with >> gpib.trigger(voltmeter) >> gpib.trigger(counter) >> >> this is more than adequate for my application but given that both >> instruments support GET (group execute trigger) command, I'd like to >> trigger them this way. But I don't know how to call this from python. The >> manual for the 34401A mentions: >> >> You can also trigger the multimeter from the HP-IB interface by >> sending the IEEE-488 Group Execute Trigger (GET ) message. >> The multimeter must be in the wait-for-trigger state. The following >> statement shows how to send a GET using HP BASIC. >> >> TRIGGER 722 Group Execute Trigger >> >> How can I do this from Python? >> _______________________________________________ >> Linux-gpib-general mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/linux-gpib-general >> >> _______________________________________________ Linux-gpib-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-gpib-general