585,902 active members*
4,187 visitors online*
Register for free
Login
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2010
    Posts
    0

    Simulink Real time

    Hi All,
    I am trying to control some RC servo's using simulink real time windows target.

    I have been successful in controlling them using regular simulink however this is not in real time.

    My servo motor controller uses a serial port connection to the computer. It takes a vector of numbers as input to determine which motors to move etc..

    I am trying to use a "packet output" block set to use the serial port with a baud rate of 9600 (required by the controller).
    I have for the moment connected a constant block up with a vector containing the numbers to send to move the motors (will swap this later, i just want to get it working for now).

    Only thing is for some reason it doesnt seem to be sending the signal (and the "data error" output of the "packet output" block is 1, indicating something is wrong).

    Does anyone have any experience with this?

    If so any advice would be great, as i am stumped on why i cant get it working.

  2. #2
    Join Date
    Oct 2008
    Posts
    116
    A useful tool for debugging serial communication problems is the Hyperterm app that comes with Windows or minicom with Linux/unix. You make a crossover cable with the data pins cross connected 2-3, 3-2 and ground. Start the terminal program and configure it to match your speed and word-length. This allows you to see what if anything is being transmitted and when. Minicom has the ability to show hex values, so you can see all transmitted values, not just the printable ones.

    I can't offer any advice on the simulink stuff, sorry.

    Good Luck,
    BobH

Similar Threads

  1. Real Time Board
    By technetics in forum Cincinnati CNC
    Replies: 3
    Last Post: 12-16-2009, 07:01 PM
  2. CLIFTON PRECISION + MATLAB/SIMULINK +ADVANTECH + GECKODRIVE
    By raiden86 in forum Servo Motors / Drives
    Replies: 1
    Last Post: 09-09-2008, 11:18 AM
  3. real time
    By Mr Bits in forum LinuxCNC (formerly EMC2)
    Replies: 8
    Last Post: 12-26-2007, 01:09 AM
  4. Real, real newbie!!!
    By aggie_67 in forum Uncategorised CAM Discussion
    Replies: 11
    Last Post: 02-04-2006, 07:10 AM
  5. Time for a real stupid question
    By sdantonio in forum DIY CNC Router Table Machines
    Replies: 12
    Last Post: 11-17-2005, 11:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •