Re: how to send a group execute trigger with python?

dave penkler <[email protected]> Wed, 6 Aug 2025 09:55:47 +0200
Newsgroups gmane.linux.hardware.gpib.general
Message-ID <CAL=kjP1zD=Dz4N=LgW-7DJ-7BafK1rwBAnEyP2w5=YhjUh53Dg@mail.gmail.com>
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