Products > Test Equipment

SCPI best practices

<< < (4/4)

HKJ:

--- Quote from: uliano on December 13, 2024, 12:02:08 pm ---The problem with SCPI, if I'm on the the right track, is that after a write of a command ()without "?") you don't get anything back not even a "\n".

--- End quote ---

Correct


--- Quote from: uliano on December 13, 2024, 12:02:08 pm ---and, here I'm guessing, if I send another command before the previous has completed it gets ignored or misinterpreted.

--- End quote ---

Usually not, but it is very device depend.
It can get rather complicated sometimes: Some devices may processed a command in background while other commands are processed in foreground. I have had some fun with that on some DMM's, I request a change to AC, but during the next couple of commands the meter is NOT in AC mode.
In TestController it is possible to use delays or *OPC (The advanced version), to handle this individually for each device.

uliano:

--- Quote from: HKJ on December 13, 2024, 12:20:17 pm ---
--- Quote from: uliano on December 13, 2024, 12:02:08 pm ---The problem with SCPI, if I'm on the the right track, is that after a write of a command ()without "?") you don't get anything back not even a "\n".

--- End quote ---

Correct


--- Quote from: uliano on December 13, 2024, 12:02:08 pm ---and, here I'm guessing, if I send another command before the previous has completed it gets ignored or misinterpreted.

--- End quote ---

Usually not, but it is very device depend.
It can get rather complicated sometimes: Some devices may processed a command in background while other commands are processed in foreground. I have had some fun with that on some DMM's, I request a change to AC, but during the next couple of commands the meter is NOT in AC mode.

--- End quote ---

very close to my (limited) experience, and it is also command-dependent (or, possibly, some command are just exectuted fast enough).


--- Quote ---In TestController it is possible to use delays or *OPC (The advanced version), to handle this individually for each device.

--- End quote ---

you mean "*OPC?" and wait for "1" as response or there is other uses of "*OPC" ?

It is really frustrating as it wouldn't have been much complex (for instrument designers) to implement some mechanism to enfoce a true sequential process.

HKJ:

--- Quote from: uliano on December 13, 2024, 01:59:21 pm ---you mean "*OPC?" and wait for "1" as response or there is other uses of *OPC ?

--- End quote ---

Another use:
Send a *OPC, then poll the device with *ESR?
This way there is no risk for timeout on the controller side, because the *ESR? is basically processed immediately.


--- Quote from: uliano on December 13, 2024, 01:59:21 pm ---It is really frustrating as it wouldn't have been much complex (for instrument designers) to implement some mechanism to enfoce a true sequential process.

--- End quote ---

It is not always a sequential process is a good solution. What would be nice is some minimum buffer requirements or a command to return remaining buffer space.

uliano:

--- Quote from: HKJ on December 13, 2024, 02:16:28 pm ---
--- Quote from: uliano on December 13, 2024, 01:59:21 pm ---you mean "*OPC?" and wait for "1" as response or there is other uses of *OPC ?

--- End quote ---

Another use:
Send a *OPC, then poll the device with *ESR?
This way there is no risk for timeout on the controller side, because the *ESR? is basically processed immediately.


--- End quote ---

my siglents don't implement *ESR  :'(


--- Quote ---

--- Quote from: uliano on December 13, 2024, 01:59:21 pm ---It is really frustrating as it wouldn't have been much complex (for instrument designers) to implement some mechanism to enfoce a true sequential process.

--- End quote ---

It is not always a sequential process is a good solution. What would be nice is some minimum buffer requirements or a command to return remaining buffer space.

--- End quote ---

I'm not saying -always- I'm saying that it should be possible to enforce the  sequence -when needed-

(and it would have just been enough to implement a working *OPC? and not a fake one returning regardless of previous command completion)

Navigation

[0] Message Index

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod