The Pico SCPI labTool (PST) allows you to connect your PC to equipment to control and monitor all sorts of things. It runs on a Raspberry Pico. It would be nice if the PST could supports device dependent SCPI registers. They can be used to notify a LabVIEW flow from the device. We finally managed to notify LabVIEW when a GPIO input changed logic level. We've come a long way. The SRQ is ready for prime time when it works in LabVIEW |
part 1: PST.. Experimental event / trigger support for Pico SCPI labTool - 1: investigate
part 2: PST.. Experimental event / trigger support for Pico SCPI labTool - 2: design the registers
part 3: PST.. Experimental event / trigger support for Pico SCPI labTool - 3: Instrument Specific Registers Test
part 4: PST.. Experimental event / trigger support for Pico SCPI labTool - 4: let TinyUSB USBTMC code use SCPI-LIB's Status Byte register
part 5: PST.. Experimental event / trigger support for Pico SCPI labTool - 5: Propagation to IEEE488.2 SCPI Registers Test
part 6: PST.. Experimental event / trigger support for Pico SCPI labTool - 6: Service Request from Instrument to LabVIEW flow
part 7: PST.. Experimental event / trigger support for Pico SCPI labTool - 7: Test Service Request from Instrument to LabVIEW flow
Test Setup
Again, I continue from the previous post: PST.. Experimental event / trigger support for Pico SCPI labTool - 6: Service Request from Instrument to LabVIEW flow .
We managed to test that the USBTMC protocol pushes the notification from the Pico to the PC software. Success in PyVISA and with NI's VISA Interactive Control tool.
LabVIEW has a good application note that shows how to do this.
Tests will systematically check
- (tested in post 5 and 6) can I propagate an event from the Operation Status register to the Status Byte register?
- (tested in post 5 and 6) did I land in the SCPI-LIB and USBTMC Service Request invocation code?
- can I set up a SRQ wait and let it return when expected (button press)?
Test SRQ with LabVIEW
Let's first bring the device in the condition that button presses fan out to OPERATION STATUS EVENT register, and propagate all up. Now in LabVIEW:
STATus:OPERation:DIGItal:INPut:NTRansition 4\n
STATus:OPERation:DIGItal:INPut:ENABle 4\n
*CLS\n
STATus:OPERation:ENABle 1\n
Enable propagation by setting SRE Bit 7 (OPER Bit) to 1, and control if it is set
*SRE 128\n
Set up SRQ mechanism and cleanup
test 1: Run the flow. Request should time out because we don't generate the event that it's waiting for.
condition:
- Start execution.
Wait on the event with a 5 second timeout. Don't push the button. This should generate a timeout.
Resume till end. - Wait on the event with a 5 second timeout. Push the button within those 5 seconds to generate the event.
result:
Result when button is not pushed while we wait for the event:
Result when button is pressed within the timeout:
pass