Products > Test Equipment

Some old school instruments showing how it's done (HP 3325A and Fluke 8506a)

<< < (49/91) > >>

joeqsmith:
When it sends the 3 bytes, are there any other's being sent (CR LF)?   If not, I am interested in how you handle making sure you are in sync?

I had been timing the end of the frame, looking for when there was no data.   It's not not a clean setup so I moved onto just pulling in what ever is on the serial port and placing it into a FIFO.  I assume the first reading is in sync and pull however much data I am expecting (depending on ASCII/Binary and trigger type).  If the converted data is not within bounds, I then index through the FIFO one location at a time, testing each combination for an in-range value.  Once I find it, I consider it back in sync, until the another reading falls out of range.   It's really only a problem in the one mode where there are no CRs ( I always disable the LF).  For these, I just search for the CR to resync.   Once it's locked, it seems fairly reliable.  I was a little concerned after adding the jumper to allow for 19.2K that the error rates may be unreasonable but I've ran the meter for several hours at a time without missing.   

Readings that are found to be in-range are placed into another FIFO that is read by the main thread.   The lowest level FIFO can store about 5 seconds of data.  The second layer after conversion to floating point will hold about 6 seconds.   The main thread runs fairly slow which updates the screen.

****
Just to add to this, the lowest level thread executes every 50ms.  At 19.2K 8,N,1 it's 521us/byte, so every 50ms it can have up to 100 bytes loaded into the FIFO, which is 10,000 bytes deep.  (math is lacking   10K/100samp*50ms, yeah 5 seconds )

I still measure the data rate the same way, measuring how often an in-range reading occurs but you can imagine there is a fair bit of error in the measurement running the threads this slow and letting the hardware / OS buffer things.  So I now also look at the over all data rate as well, seeing over the course of how ever long I run, how much data has been collected.   It just made the code cleaner to architect it  this way.   

garrettm:
As far as I can tell, binary data does not use termination characters to denote end of payload, so continuous readings probably aren't the best method to use for HS operation. I have a raspberry PI that I want to try using with one of the GPIO pins to trigger the DMM for synching the reading rates. This way I don't need to consider a buffer and the transfer speed should be as fast as the DMM will go.

For the bit serial interface, toggling ! should allow the same thing as I am going to attempt with the rear trigger input. The problem with my serial-GPIB conversion is that I can't control the talk/listen state of the DMM directly, so I can't actually get that first 3-bytes of data from the ! command, and If I send ? the meter will go back to listen mode. The talk-back on time-out setting is what sets my DMM into talk mode for the triggering to work but its worthless for anything else.

Have you tried testing reading rates using the HS mode yet? I'm curious how fast you can get your meter to send data. With 10bit frames and 19200 baud and 3-byte binary data, the bus can handle more than 500 readings/s. I really don't know why Fluke disabled it for that interface when even 9600 baud can handle 320 readings/s.

joeqsmith:
Are you referring to the 3-byte or all binary data not using terminators?   This isn't what I see is why I ask.  Could be the meter or firmware.

I haven't tried it yet but if it works, I plan to just add it to the code I have.    I did read that section of the 3-byte format.   Looks simple enough.   

SilverSolder:

--- Quote from: joeqsmith on February 10, 2021, 11:09:32 pm ---Are you referring to the 3-byte or all binary data not using terminators?   This isn't what I see is why I ask.  Could be the meter or firmware.

I haven't tried it yet but if it works, I plan to just add it to the code I have.    I did read that section of the 3-byte format.   Looks simple enough.   

--- End quote ---

Perhaps the terminators are added somewhere else along the way, in the interface firmware or in a library looking at the interface?

joeqsmith:
Somewhere else, interface firmware, library?   I have no idea what you are referring to.  I treat the meter as a block box.  The meter w/ 607 firmware spits out the CRs when certain binary modes are selected.  There's nothing between the meter and the PC that is adding these.   

Navigation

[0] Message Index

[#] Next page

[*] Previous page

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