The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Replies: 6   Last Post: Oct 3, 2013 10:06 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Gordon Weast

Posts: 734
Registered: 12/7/04
Posted: Oct 3, 2013 10:06 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Sent directly via email since the newsgroup won't allow an attachment.

Francisco Resquin wrote:
> Dear Gordon,
> I have some problem with xPC Target RS232 communication, and I can not
> find the white paper (xPC Target Serial Communication Information) that
> you mentioned before. Please, can you send me the zip files?
> Best regards.
> Gordon Weast <> wrote in message
> <jtnck4$j7a$>...

>> What you're trying to do is quite possible. Please take a look at the
>> paper with examples at:
>> Download the zip file under 'xPC Target Serial Communication
>> Information' (second item under 'Fact Sheets'). Read it and see if
>> your questions are answered.
>> Gordon Weast
>> xPC Target Development
>> MathWorks
>> Zhuo Li wrote:

>> > "RED STONE" wrote in message <hf69cc$at9$>...
>> >> I am designing a moment control system which is used on train. The
>> >> core element to be controled is an EC motor. I have designed a simple
>> >> control board based on FPGA which can translate control command to the
>> >> motor and translate the angle speed informantion to the center control
>> >> PC by RS-232 port.
>> >> Now the center control PC is the Target PC whose control law is
>> >> designed in a laptop.
>> >> Both the control command and the angle speed data are translated in
>> >> hex format. Today I did many experiments to identify the RS232
>> >> communication and found some intresting things.
>> >> The format of data from the motor to Target PC is FF FF FF xx xx xx
>> >> cc.
>> >> FF FF FF: has no meaning
>> >> xx xx xx: the angle speed
>> >> cc: the command
>> >> The format of data from Target PC to the motor is cc.
>> >> cc: the command
>> >> First,the problem in my last mail was sloved, just setting the
>> >> format as %c and Matlab can translate the integer into hex format. The
>> >> motor can follow the command after setting it as %C. I have try other
>> >> option such as %x, %f... but have no effect.
>> >> Second, because the data from the motor to Target PC has 7 bytes.
>> >> So I setted the Mainboard RS-232 receive block format as '%x %x %x %x
>> >> %x %x %x' , update the model, the receive block generate 7 port. And I
>> >> add xpcscope for each to observe the data as the appendix with the
>> >> letter.In the experiment I found that if I changed the sample time the
>> >> turn of the receive data can be chaned the same time. For example, you
>> >> may receive the data as 'FF FF xx xx xx cc FF 'or'' FF xx xx xx cc FF
>> >> FF 'and so on. Can you give me some advices? thanks!!!

>> >
>> >
>> > Hi, Did you finanly get an answer? I have the same problem.
>> > Actually, I hope Matlab can design the FIFO block to be able to read the
>> > hardware buffer only when there is new message coming in instead of
>> > keeping sampling it. I also tried to include "read to delimiter", but
>> > still, it auto wraps the words. Regards,
>> > Li

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.