Re: Serial Communication



"steve smith" <stevesmith0518@xxxxxxxxxxx> wrote in message <gbthc9$8kj$1@xxxxxxxxxxxxxxxxxx>...
I am attempting to communicate with a device via a 9pin through serial connection. The device is a syringe pumping apparatus. When configured according to the manufacturer's instructions through hyperterminal, the apparatus can understand ASCI string data such as 'RUN', 'REV', and 'STP'as well as general config data like inputting syringe diameter size and discharge rate.

When I try to operate the apparatus through MatLab, however, it fails to respond. I create a serial port using the s=serial('COM1') command and open the port in MAtLab. I configure the baudrate, # of stop bits, etc using MatLab. I then use the fwrite() command. I attempt to write the string fwrite(s,'RUN'); or fwrite(s,'REV') to the device with nothing occurring. (i.e., I am attempting to send the string 'RUN' or 'REV' to the device).

The device is also capable of transmitting its current status, i.e., if it is stopped or running. How do I accomplish this? Do I create a for loop in order for MatLab to continuously read information from the device and report its status?


when you commanded the devide through hyperterminal did it reply before you hit enter? if not then you probably have to add \n or \r or some combination of those to the end of your fwrite string. also, what precision are you specifying for fwrite? to send characters you should specify 'uchar' as the precision, otherwise i don't know what it might default to.
.



Relevant Pages

  • Serial Communication
    ... The device is also capable of transmitting its current status, i.e., if it is stopped or running. ... How do I accomplish this? ... Do I create a for loop in order for MatLab to continuously read information from the device and report its status? ...
    (comp.soft-sys.matlab)
  • Re: Building An Organization Tree From Records?
    ... My objective is to accomplish both, but primarily convert my source data ... "Nikos Yannacopoulos" wrote in message ... > a tree-like report, or convert your input table to a hierarchical ...
    (microsoft.public.access.formscoding)
  • Re: Detail Height
    ... explain in detail exactly what you are trying to accomplish. ... > I have report that I use print by VB Event / on Format ... > Dim Number, Words, TheRaw As Integer ... > Number = Len'strLast data coms from VB print ...
    (microsoft.public.access.reports)
  • Re: GPS Data Bandwidth Usage
    ... We are running a fleet of approximately 400 vehicles equipped with GPS ... These vehicles are transmitting data across ... a Motorola Datatec 900 MHz network. ... system up initially to report less often, ...
    (sci.geo.satellite-nav)
  • Re: specify printer
    ... The specified printer is not my default printer. ... several ways to accomplish this goal. ... One simple ways to simply open up the report in design mode and then go page ... dim strDefaultPrinter as string ...
    (microsoft.public.access.macros)