|   |
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Home |
The SB-6668 can be remote controlled by a group of SB-Bus commands.
Two main groups of commands exist, system commands and control commands.
System commands can be recognized by the preceding asterisk * symbol.
All other commands are the control commands and they control the specific functions of the SB-6668.
The system commands are the only commands that can be executed when the device is selected by the general call address (255).
You can repeat the last command, including its parameters, by simply sending a single CR character to the device. You'll get a NOTHING TO REPEAT ERROR message if no command was previously executed though.
The following description uses a special notation to simplify the explanation.
Optional parameters are enclosed in square brackets [...].
You shouldn't type the square brackets yourself if you want to use such a parameter, it's just an indication that the parameter is optional!
Here are a few examples of commands and parameters:
Use: *CATALOG? This system command displays all available SB-Bus commands of the SB-6668. All command names are sent to the master computer separated by a CR character.
This command can be used together with Acknowledge flow control.
If Acknowledge flow control is activated the master must send an acknowledge every time it receives one of the commands from the total list.
The *CATALOG? command produces the following alphabetically ordered list: *CATALOG? *ERROR? *FAST *FLOW *FLOW? *HOLD *ID? *LOCS *REMS *RST *SLAVE *SLOW *TRIG *TST? CALC? DISPLAY? FORMAT FORMAT? FREQ? HOLD OFFSET OFFSET? OPTION OPTION? RATE RATE? REFERENCE REFERENCE? RESET SCALE SCALE? SPEED SPEED? SYNC => The *CATALOG? command doesn't allow any parameters. Error messages:
Use: *ERROR? The *ERROR? command gives you a description of the last command's error cause. Remember that you have to give the *ERROR? command directly after receiving an error prompt, otherwise the cause is overwritten by the error state of the latest commands. In fact you only need to give the *ERROR? command if an execution error prompt is received (!>). The => prompt will always result in the NO ERROR message, while the ?> prompt will always generate a SYNTAX ERROR message. Please refer to SB-Bus Errors for a complete list of all possible error messages. Error messages:
Use: *FAST
After this command the SB-6668 is switched to the fast respond mode.
In this mode it won't delay after sending a CR character, as it would do if it were switched to slow mode.
You can switch to slow mode by sending the *SLOW command. Error messages:
Use: *FLOW XOFF | ACK
This command sets the flow control mode of the SB-Bus.
The default flow control mode is XON/XOFF.
Examples:
Error messages:
Use: *FLOW? With this command you can find out whether the Acknowledge flow control is active or not. This command will give one of two possible answers: XON/XOFF Only the XON/XOFF flow control mode is active. ACKNOWLEDGE Acknowledge flow control and XON/XOFF flow control are both active. Error messages:
Use: *HOLD
This command sets the SB-Bus interface into the HOLD mode, which means that the next command will not be executed directly but will be placed in hold.
The command which is placed in hold is not executed until the *TRIG command is given.
Please note that this a completely different command than the HOLD command (without the asterisk), which is used to freeze the current values. The commands that are to be put in hold must be given completely, including the required parameters. Such a command is parsed immediately, including the parameters. If a parameter error is detected you receive the error prompt and the hold mode is terminated. The *ERROR? command can not be placed in hold. This command will always report the last error cause directly without affecting the hold mode in any way. Error messages:
Use: *ID? An SB-Bus device must answer with its name and software version number when it receives this command. The SB-6668 can respond with one of two strings depending on the selected meter model: SB-6668 FREQUENCY COUNTER V1.0 SB-6667 FREQUENCY COUNTER V1.0 You will have to set the appropriate meter model with the OPTION command before the *ID? command can respond with the proper answer. Error messages:
Use: *LOCS
This command allows local control of the device.
The only local control on the SB-6668 that can be affected by this command is the "Menu" key.
Error messages:
Use: *REMS
This command inhibits local control of the device.
The only local control on the SB-6668 that can be affected by this command is the "Menu" key.
Error messages:
Use: *RST This command resets the SB-6668. Resetting has the same effect as switched the device off and then on again. After reset the instrument is not selected anymore, so it won't respond with an OK prompt. Please note that this command has an entirely different function than the RESET command! Error messages:
Use: *SLAVE address | $address The SB-6668 can be set to answer to any SB-Bus address you like. This address is stored in NV-RAM and can be changed with the *SLAVE command. When the SB-6668 is switched on for the first time it will respond to the SB-Bus address 254, which is the default address for all new devices. You'll have to change the default address to a different unique address as soon as possible to avoid future conflicts with other new devices.
You can enter normal SB-Bus slave addresses ranging from 130 to 254 as parameter to the *SLAVE command.
Or you may subtract 128 from the address, to get addresses in the range of 2 to 126.
The SB-6668 remains selected after the new address is set but you can test the new address immediately by sending the new address to the bus. The SB-Bus protocol recommends the address range from 170 to 179 to be used for measuring instruments. This is just a recommendation and you may choose any other address you like as long as it is a unique address on your bus system. But some software may search for an instrument at addresses 170 to 179 first, before scanning all other addresses to speed up the search.
In order to be able to change the SB-Bus address the SB-6668 must be selected.
It doesn't matter whether it is selected by its own (temporary default) address or by the general call address.
If you don't know the private address of the SB-6668 you can always use the general call address 255.
Examples: *SLAVE 171 New address is set to 171 *SLAVE 43 New address is set to 171 (43 + 128) *SLAVE $AB New address is set to 171 ($AB = 171) Error messages:
Use: *SLOW
After this command the SB-6668 is switched to the slow respond mode.
In this mode it will delay about 5ms after sending each CR character.
Error messages:
Use: *TRIG
This command will trigger the execution of the command that was previously placed in hold by the *HOLD command.
You can trigger the execution of commands in hold even when the SB-6668 is selected by the general call address.
The command in hold is executed using the parameters that were given to it when it was placed in hold. If an error occurs during the execution of the command in hold a normal error message will be reported. Please note that the *TRIG command is the only SB-Bus command that can answer with one or more strings, even when it is not followed by a question mark. Error messages:
Further more you can expect any other error message known to the system, depending on the execution result of the command that was placed in hold.
Use: *TST? This command performs some minor functionality tests on the hardware of the SB-6668. It is impossible to make a 100% reliable functionality test but it's a test anyway. The command shows the number of watch dog resets and tests the I²C bus and the operation of the EEPROM. If all's well the *TST? command will produce the next three lines: NVM MEMORY OK IIC BUS OK 0 WATCHDOG RESETS
The first line tells us that the data in the NVM memory are still valid.
The second line indicates that the I²C Bus is functioning.
You may expect the NVM memory to fail too if the I²C Bus is not OK.
Other possible answers of the *TST? command are:
Error messages:
Use: CALC? This command tells you with what formula the measured frequency is modified to obtain the value in the display. You can use the OFFSET? and SCALE? commands to find out what the actual values of both parameters are. The CALC? command can produce any of the following answers: DISPLAY=FREQUENCY The displayed value is equal to the measured frequency. None of the math functions are active. DISPLAY=FREQUENCY+OFFSET The displayed value is equal to the measured frequency plus or minus the offset value. DISPLAY=FREQUENCY*SCALE The displayed value is equal to the measured frequency multiplied or divided by the scaling value. DISPLAY=(FREQUENCY*SCALE)+OFFSET The measured frequency is first multiplied or divided by the scaling value, then the offset value is added to or subtracted from that result. DISPLAY=(FREQUENCY+OFFSET)*SCALE The offset value is first added to or subtracted from the measured frequency after which it is multiplied or divided by the scaling factor. Error messages:
Use: DISPLAY? [H[OLD]]
This command returns the value that is currently displayed on the instrument.
The returned value is the result of the measured frequency including the currently selected math functions.
So the returned value doesn't necessarily have to be the same as the applied frequency!
The format in which the value is returned is determined by the format that was set by the FORMAT command. Below you can see some values that can be returned by the DISPLAY? command. For each result the first value is the value returned in format 1, the second value is the value that is returned if format 2 is selected.
Please note that the decimal point in the values is always behind one of the 3 most significant digits of the mantissa, while the exponent part of the value can always be divided by 3. This is different from the way the values are displayed on the instrument! There are some more differences if the Speed function is active. The returned frequency still has a 7 digit resolution and a decimal point is displayed. Frequencies above 9999Hz will result in an overload on the instrument's display, while the SB-Bus can still return the actual frequency.
The instrument can not perform new measurements while the user has activated the Menu.
If you try to read the display value while the user has activated the Menu the DISPLAY? command will result in a MENU IS ACTIVE ERROR message.
Error messages:
Use: FORMAT 1 | 2 You can select one of two possible formats in which measured values are sent to the computer. The two possible formats are called 1 or 2.
Format 1 is the default format after Reset. Error messages:
Use: FORMAT? This command returns the currently selected format. The format can be changed with the FORMAT command. The command will return the value 1 or 2 depending on the currently selected format. Error messages:
Use: FREQ? [H[OLD]]
This command returns the actually measured frequency.
The returned value is never the result of any of the math functions.
So the returned value is always equal to the measured input frequency!
The format in which the value is returned is determined by the format that was set by the FORMAT command. Below you can see some values that can be returned by the FREQ? command. For each result the first value is the value returned in format 1, the second value is the value that is returned if format 2 is selected.
Please note that the decimal point in the values is always behind one of the 3 most significant digits of the mantissa, while the exponent part of the value can always be divided by 3. This is different from the way the values are displayed on the instrument! The FREQ? command will always return just one value because it will not return the percentage when the Speed function is active.
The instrument can not perform new measurements while the user has activated the Menu.
If you try to read the frequency while the user has activated the Menu the FREQ? command will result in a MENU IS ACTIVE ERROR message.
Error messages:
Use: HOLD The HOLD command stores all current values in a temporary memory location to enable easy reading of values taken at the same moment. This command can be very useful together with the *HOLD system command. Placing this command in hold enables you to take multiple readings on different devices at the same moment in time. To do this set all instruments in hold one by one, then select them all with the general call address and send the *TRIG command. After that you can read the measured values from all devices one by one. Please note the difference between the HOLD command and the system *HOLD command! The HOLD command places all current values in a temporary memory location, while the system *HOLD command will place the next command in hold mode, waiting to be executed by the *TRIG command.
The HOLD command will store the current frequency, the modified value by any active math function and the percentage if the Speed function is active.
Please note that these are the values you normally read while executing the FREQ? and DISPLAY? commands.
The HOLD memory will not be influenced by any other command (except *RST), not even by the RESET command. Values stored in the hold memory will remain valid until they are over written by executing a new HOLD command If the command is given while the user has activated the Menu the HOLD command will not be executed and terminates with a MENU IS ACTIVE ERROR. This is because the instrument can not perform new measurements while the Menu is active. Error messages:
Use: OFFSET +offset | -offset | S,offset | D,offset With this command you can perform three different functions:
The offset list is the list that is presented to the user if he/she wants to select an offset value manually in the Menu.
This list can contain up to 50 different values and is shared with the scaling value list.
It doesn't matter whether you use 10 offset values and 40 scaling values, or the other way around.
The maximum number of values in the list is simply 50.
You can activate or change the current offset value by starting the parameter with a + or a - sign.
The value of offset is the actual value that is to be added to or subtracted from the measured frequency.
Please note that you must specify the polarity of the offset, even when the polarity is positive!
If the first character in the parameter field is an S the following offset value will be added to the Offset list in NVM memory.
This S must be followed by a comma to separate it from the actual offset value.
No sign is expected for the offset value because it is up to the user to select the appropriate polarity later on.
Please note that the offset value is only stored in NVM memory. The Offset function is not activated, nor will an active offset value be changed to the entered value. The NVM memory is filled with some default Offset values when the counter is switched on for the very first time. This default list can be changed any at time and all changes will be retained when the instrument is powered off. The default list contains the following offset values: 445 kHz 450 kHz 455 kHz 5.5 MHz 5.74 MHz 6 MHz 5.5 MHz 10.7 MHz 38.9 MHz
If the first character in the parameter field is a D the following offset value will be deleted from the Offset list in NVM memory.
This B must be followed by a comma to separate it from the actual offset value.
No sign is expected for the offset value.
Please note that the actual Offset function is not affected by this command. Only the offset value will be deleted from the Offset list.
Entering the offset frequency is very flexible.
You may enter the mantissa only, or you may specify the exponent as well (following the letter E).
The decimal point may be placed anywhere in the the mantissa part of the value.
And you may omit the + sign in the exponent field if it is a positive exponent value.
Error messages:
Use: OFFSET? [L[IST]] This command will report the currently selected offset value. It is also possible to recall the whole list of predefined offset values with this command if you use the LIST parameter.
This command will return the currently active offset value if no parameter is given.
This value is always given in engineering format (format 2), regardless of the selected format.
The offset value's polarity is indicated by a + or a - sign preceding the actual value.
The OFFSET? command will return the complete Offset list if the parameter LIST is given.
This parameter may also be abbreviated to the first character L.
Error messages:
Use: OPTION SB6668 | SB6667 | EXTREF | NOEXTREF | RESETNVM
With this command you can select your counter model and whether you have installed the external reference switch circuitry.
It is also possible to re-initialize the NVM memory so you can start all over again.
The counter model can be selected by giving the SB6668 or SB6667 parameter.
Per default the model SB6668 is selected.
Another option you can set with this command is whether there is a reference source switch installed in your counter.
This can be done with the EXTREF and NOEXTREF parameters.
Per default the counter expects that the reference source switch is installed.
Finally you may initialize the NVM memory.
After resetting the NVM memory it is as if you switched the counter on for the very first time.
First the memory is erased and then all defaults are restored.
Error messages:
Use: OPTION? This command will respond with two lines, indicating the selected options. The first line shows the selected meter model (either SB6668 or SB6667). The second line shows if reference source switching is enabled (either EXTREF or NOEXTREF). Because this command will generates a multi-line answer it can also be used with Acknowledge flow control. Error messages:
Use: RATE FAST | SLOW
This command enables you te select between the slow and fast measuring rate.
The counter completes a measurement about every second in the slow mode.
In the fast mode it completes about 5 measurements per second.
Error messages:
Use: RATE? This command returns the currently selected measurement rate. It answers with the strings FAST or SLOW. Error messages:
Use: REFERENCE I[NT[ERN[AL]]] | E[XT[ERN[AL]]] This command enables you to select the reference source. You may select the source to be Internal or External, provided that your counter is equipped with a reference switching circuitry. The parameter parsing is very flexible. You may specify I, INT, INTERN or INTERNAL as parameter to switch to the internal reference source. Or you may specify E, EXT, EXTERN or EXTERNAL as parameter to switch to the external reference source. It's the operator's responsibility to supply an appropriate reference signal to the external reference input on the rear panel of the counter. Otherwise the counter will count nothing or gives inaccurate results. Error messages:
Use: REFERENCE? With this command you can determine what reference source is currently selected. It answers with either INTERNAL, EXTERNAL or NO REFERENCE SWITCH. Error messages:
Use: RESET
This command is used to switch of all the math functions at once.
It is equivalent to the RESET function that can be executed from the Menu.
Error messages:
Use: SCALE *scale | /scale | S,scale | D,scale With this command you can perform three different functions:
The scale list is the list that is presented to the user if he/she wants to select a scaling value manually in the Menu.
This list can contain up to 50 different values and is shared with the offset value list.
It doesn't matter whether you use 10 offset values and 40 scaling values, or the other way around.
The maximum number of values in the list is simply 50.
You can activate or change the current scale value by starting the parameter with a * or a / symbol.
The value of scale is the actual value that is to be multiplied with or divided on the measured frequency.
Please note that in case the division function is used it is the frequency that is divided by the scaling factor.
If the first character in the parameter field is an S the following scale value will be added to the Scale list in NVM memory.
This S must be followed by a comma to separate it from the actual scale value.
No function symbol is expected for the scale value because it is up to the user to select the appropriate function later on.
Please note that the scale value is only stored in NVM memory. The Scale function is not activated, nor will an active scale value be changed to the entered value. The NVM memory is filled with some default Scale values when the counter is switched on for the very first time. This default list may be changed at any time and all changes will be retained when the instrument is powered off. The default list contains the following scaling values: 2 3 4 8 10 15 16 32 64 128 256 512
If the first character in the parameter field is a D the following scale value will be deleted from the Scale list in NVM memory.
This B must be followed by a comma to separate it from the actual scale value.
No function symbol is expected for the scale value.
Please note that the actual Scale function is not affected by this command. Only the scale value will be deleted from the Scale list.
Entering the scale frequency is very flexible.
You may enter the mantissa only, or you may specify the exponent as well (following the letter E).
The decimal point may be placed anywhere in the the mantissa part of the value.
And you may omit the + sign in the exponent field if it is a positive exponent value.
Error messages:
Use: SCALE? [L[IST]] This command will report the currently selected scale value. It is also possible to recall the whole list of predefined scaling values with this command if you use the LIST parameter.
This command will return the currently active scaling factor if no parameter is given.
This value is always given in engineering format (format 2), regardless of the selected format.
The scaling factor is preceded by the current scaling function which is * for multiplication or / for division.
The SCALE? command will return the complete Scaling factor list if the parameter LIST is given.
This parameter may also be abbreviated to the first character L.
Error messages:
Use: SPEED CCIR | DIN
This command will activate the Speed function.
The same Speed function can also be activated manually.
When the Speed function is selected the display will show a 4 digit frequency and a 2 digit deviation percentage from the nominal frequency.
Remember that the counter can only display 4 digits because of its limited number of digits on the LCD. This limit does not apply if you read the display value using the DISPLAY? command.
You can also use the other math functions together with the Speed function.
These other math functions will always have a higher priority, making the Speed function always the last function to be executed on each measurement.
Error messages:
Use: SPEED? With this command you can find out whether the Speed function is active or not, and what standard it is set to. It can respond with any of these three strings: SPEED IS NOT ACTIVE CCIR DIN Error messages:
Use: SYNC This command does nothing but wait until the current measurement is completed and displayed. It can be used to synchronize the controlling computer to the actual measurements. The OK prompt => is returned immediately as soon as the current measurement is completed. The execution error MENU IS ACTIVE ERROR occurs if this command is executed while the Menu is active. Error message s:
|