Experimental Physics and Industrial Control System
> I am implementing an EPICS IOC to control a device connected via GPIB to an Keysight E5810 LAN/GPIB Gateway.
> Therefore I am using devGPIB of the asyn module and connect to the gateway over LAN via the VXI11 Protocol.
Note that you do not need to use devGPIB to talk to the device with asyn. You should be able use StreamDevice, for example.
That said, I am not familiar with the VXI-11 STB, so perhaps Eric Norum can answer this.
Mark
________________________________
From: [email protected] [[email protected]] on behalf of Niedermayer, Philipp [[email protected]]
Sent: Thursday, March 02, 2017 7:51 AM
To: [email protected]
Subject: STB and Serial Trigger for async devGpib vxi11 device support
Hello,
I am implementing an EPICS IOC to control a device connected via GPIB to an Keysight E5810 LAN/GPIB Gateway. Therefore I am using devGPIB of the asyn module and connect to the gateway over LAN via the VXI11 Protocol.
I am able to send simple commands to the device. However, for a measurement routine a more complex protocol is required by the device. This includes not only sending and receiving binary data but also reading out the status byte (VXI: “Word Serial Read STB”) and sending a trigger (VXI: “Word Serial Trigger”).
Therefore I have chosen a GPIBCVTIO command with a custom convert function that takes care of all I/O that the protocol requires. However I cannot figure out how to read the STB and trigger the device.
Below is a draft of the custom I/O function with the missing parts.
How can I get the STB and do Serial Triggering?
Thanks in advance for your help,
Philipp
/* file XXXSup/devXXX.c */
//...
static int measurement(struct gpibDpvt *pgpibDpvt, int P1, int P2, char **P3) {
size_t count = 0;
// initiate measurement by sending single byte "\x17"
asynStatus status = pgpibDpvt->pasynOctet->write(
pgpibDpvt->asynOctetPvt, pgpibDpvt->pasynUser,
"\x17", 1, &count);
// TODO: check that STB equals 0xA to continue (device will not raise SRQ)
// TODO: start measurement by triggering the device (Serial Trigger)
// TODO: check STB:
// 0x8 --> measurement completed, data ready
// 0x2 --> error occurred, abort
// TODO: initiate data sending by triggering the device again
// read data (128 bytes)
char buffer[128];
asynStatus status = pgpibDpvt->pasynOctet->read(
pgpibDpvt->asynOctetPvt, pgpibDpvt->pasynUser,
buffer, 128, &count, 0);
// DONE
return 0;
}
//...
static struct gpibCmd gpibCmds[] = {
//...
{&DSET_SI, GPIBCVTIO, IB_Q_LOW, 0, 0, 0, 0, measurement, 0, 0, 0, 0, 0},
};
//...
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
- References:
- STB and Serial Trigger for async devGpib vxi11 device support Niedermayer, Philipp
- Navigate by Date:
- Prev:
STB and Serial Trigger for async devGpib vxi11 device support Niedermayer, Philipp
- Next:
Using asynMask without direct hardware access Luca Cavalli
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
<2017>
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
STB and Serial Trigger for async devGpib vxi11 device support Niedermayer, Philipp
- Next:
Re: STB and Serial Trigger for async devGpib vxi11 device support Eric Norum
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
<2017>
2018
2019
2020
2021
2022
2023
2024