Notice: Constant DATE_RFC7231 already defined in /home2/greeneye/public_html/comscript_manual/includes/bootstrap.inc on line 258
send | ComScript Manual

Error message

  • Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in drupal_environment_initialize() (line 690 of /home2/greeneye/public_html/comscript_manual/includes/bootstrap.inc).
  • Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in drupal_environment_initialize() (line 691 of /home2/greeneye/public_html/comscript_manual/includes/bootstrap.inc).
  • Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in drupal_environment_initialize() (line 692 of /home2/greeneye/public_html/comscript_manual/includes/bootstrap.inc).
  • Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in drupal_environment_initialize() (line 695 of /home2/greeneye/public_html/comscript_manual/includes/bootstrap.inc).
  • Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in drupal_environment_initialize() (line 697 of /home2/greeneye/public_html/comscript_manual/includes/bootstrap.inc).
  • Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in include_once() (line 290 of /home2/greeneye/public_html/comscript_manual/sites/default/settings.php).
  • Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in include_once() (line 291 of /home2/greeneye/public_html/comscript_manual/sites/default/settings.php).
  • Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in include_once() (line 299 of /home2/greeneye/public_html/comscript_manual/sites/default/settings.php).
  • Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in include_once() (line 306 of /home2/greeneye/public_html/comscript_manual/sites/default/settings.php).
  • Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in drupal_settings_initialize() (line 860 of /home2/greeneye/public_html/comscript_manual/includes/bootstrap.inc).
  • Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in drupal_settings_initialize() (line 869 of /home2/greeneye/public_html/comscript_manual/includes/bootstrap.inc).
  • Warning: session_name(): Cannot change session name when headers already sent in drupal_settings_initialize() (line 872 of /home2/greeneye/public_html/comscript_manual/includes/bootstrap.inc).
  • Warning: Cannot modify header information - headers already sent by (output started at /home2/greeneye/public_html/comscript_manual/includes/bootstrap.inc:258) in _drupal_bootstrap_page_cache() (line 2485 of /home2/greeneye/public_html/comscript_manual/includes/bootstrap.inc).
  • Warning: session_set_save_handler(): Cannot change save handler when headers already sent in drupal_session_initialize() (line 242 of /home2/greeneye/public_html/comscript_manual/includes/session.inc).
  • Warning: session_id(): Cannot change session id when headers already sent in drupal_session_initialize() (line 266 of /home2/greeneye/public_html/comscript_manual/includes/session.inc).
  • Warning: Cannot modify header information - headers already sent by (output started at /home2/greeneye/public_html/comscript_manual/includes/bootstrap.inc:258) in drupal_send_headers() (line 1305 of /home2/greeneye/public_html/comscript_manual/includes/bootstrap.inc).
  • Warning: Cannot modify header information - headers already sent by (output started at /home2/greeneye/public_html/comscript_manual/includes/bootstrap.inc:258) in drupal_send_headers() (line 1305 of /home2/greeneye/public_html/comscript_manual/includes/bootstrap.inc).
  • Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in book_prev() (line 775 of /home2/greeneye/public_html/comscript_manual/modules/book/book.module).
  • Warning: Cannot modify header information - headers already sent by (output started at /home2/greeneye/public_html/comscript_manual/includes/bootstrap.inc:258) in drupal_send_headers() (line 1305 of /home2/greeneye/public_html/comscript_manual/includes/bootstrap.inc).
  • Warning: Cannot modify header information - headers already sent by (output started at /home2/greeneye/public_html/comscript_manual/includes/bootstrap.inc:258) in drupal_send_headers() (line 1305 of /home2/greeneye/public_html/comscript_manual/includes/bootstrap.inc).
  • Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /home2/greeneye/public_html/comscript_manual/includes/common.inc).

send

send

Extends the collect command to include the ability to send a string, or lines from a file to the set device before collecting data.  This command is commonly used when an instrument needs to be polled to output data and to command devices.  It contains all the same functionality as collect so instrument data and device responses can be saved into variables and/or to files. 

Attributes:

string: the sting to send to the device
file:the filename to write all collected data to
var: the variable to write all collected data to
type: "Hex" or "Text" depending on the type of communication
behavior: "triggerterminator" (can be abrievieated "tt"), "chars", or "numberofbytes".
    Trigger/Terminator collected all data between a trigger string and a terminator
    string.  Number of Bytes collects a specific number of bytes. Chars collects a
    specific number of characters.
timeout: the max milliseconds to wait before terminating communication with the device
aftercollection: the string to be appened to the collected data
 
triggerterminator attributes
ms: integer value for the minimum milliseconds to wait after collection begins
trigger: the string to wait for before collecting/looking for the terminator. Empty string
    to begin collecting immediately.
terminator: the string to wait for before terminating the connection. Empty string to collect
    until the timeout occurs.
keeptrigger: "True" or "False" - determines if the trigger is also collected along with the
    data following it
keepterminator: "True" or "False" - determines if the terminator is also collected along
    with the data preceding it
 
chars attributes
length: the number of characters to collect
collected: the name of the variable to store the number of collected characters
 
numberofbytes attributes
bytes: number of bytes to collect
bytescollected: number of bytes actually collected
var: the name of the variable to store the collected bytes

file send attributes
sendfile: the file to be sent to the device
start: the line of the file to start from
sendlines: the number of lines to send
sendchars: the number of ASCII characters to send

Examples:

Text communications/collection:
<send string="start" behavior="tt" file="CollectionFile.txt"  var="MyData"  ms="5000" trigger="{13}" terminator="{13}" timeout="8000" type="Text" keeptrigger="false" keepterminator="true" />
<send string="off" />
 
Number of bytes collection for hex communication:
<collect file="CollectionFile.txt" var="data" behavior="numberofbytes" bytes="32" bytescollected="collected" timeout="5000" type="Hex" />
 
Send a file:
<send sendfile="myfile.txt" sendlines="10" start="1" /> - sends the first 10 lines of the file
<send sendfile="myfile.txt" sendchars="4" start="7" /> - sends up to 4 characters from line 7 of the file