Seite 1 von 1

Send receive uart

Verfasst: Mittwoch 28. Dezember 2016, 19:39
von TOURNEUR
Hello

In a realization ,I use a specific module from Parallax, the motor mind B.

The protocol is pretty simple ,and i started use RS232 hardware module from Profilab EX.

In first I used the octal receiver which not include any synchro separator in the setting parameter .

But to affine my project ,where I must receive multiple octets, I started use the string séparator with chain séparator ,to divide the multiple octets out.

But at this time ,the string separator wasn't realize any reception of my module.

I check ,n° of port ,baud flux ,which is the habitual error .
But I think the separator set in the parameter ,which is the unique difference with octet receiver ,is the cause of the non reception of my module .

I tested the string receiver without any separator in the setting ,in the emitter too .

But no chains flux appear again from my receiver .
There is only read possible with the octal receiver .


With a serial software spy ,I always see my response come after a request ,but never out of my rs232 string module from profilab expert .




I don't understand ...

Re: Send receive uart problem

Verfasst: Donnerstag 29. Dezember 2016, 07:38
von QMESAR
Hi

I am not sure if I understand you correctly however to receive strings(data) from the serial (UART) port you need a COM receive component which I do not see in your screen prints you posted
just a thought ,I use a Serial To USB converter chip and the COM components in PL4 works perfectly :D

Good luck

Re: Send receive uart problem

Verfasst: Donnerstag 29. Dezember 2016, 18:55
von TOURNEUR
Thanks for your reply Qmesar,

I thought ,my post too much detailed ,and could give some confusion in my help request.

I do not have problem in the communication with my external device .

I received correctly my frame byte with "recevoir octet" module like the picture "Emit receive UART2"

But when I use "COM" like in the picture "Emit receive UART3" nothing come from the module, but you can see with a spy uart software log in the picture "Emit receive UART" ,my external device send his reply correctly after a request ,without any separation bytes.

I set the com module without any separation byte ,but it don't reply .


Why the com module ,without separation byte ,not reply like "octet receiver " module ?

Re: Send receive uart problem

Verfasst: Donnerstag 29. Dezember 2016, 19:09
von QMESAR
Hi

Unfortunately I do not know this component hope one of the experience users will /can help you :)
good luck

Re: Send receive uart problem

Verfasst: Samstag 31. Dezember 2016, 00:29
von IKT
Not certain to understand the problem correctly ...

A simple COM send / receive String (base cirquit only) see below:
COM_snd_rec_2016-12-31.png
COM_snd_rec_2016-12-31.png (26.34 KiB) 9186 mal betrachtet

Re: Send receive uart problem

Verfasst: Montag 2. Januar 2017, 19:21
von TOURNEUR
Thanks ,for your help IKT

But unfortunally ,it's doesn't work ...

I ask myself if string com ,recognize HEX format ,

When i use octet com ,everything coming into my com port appear on the virtual pin ,without any synchro bytes.

But the protocol which i use ,employ the HEX format .

With the string com ,I have ASCII to CHAR converter ,CHAR to ASCII converter , but hex is different to CHAR or ASCII .

It's my proper thinking ,but I can do an error ....

I don't know if COM value can receive directly hex format .

The synchro byte which give me problem too ,
With octet com, no synchro byte needed ...

Re: Send receive uart problem

Verfasst: Montag 2. Januar 2017, 23:27
von IKT
Hi TOURNEUR,

can you please post the Manual of the device you are using?? A .pdf would be fine. Otherwise, a link to the Manual, on the Manufacturers web page.

Re: Send receive uart problem

Verfasst: Dienstag 3. Januar 2017, 19:15
von TOURNEUR
Hello IKT,

This is a motor controler from Paralax, which the name is Motor Mind B.

I tested all the sub function excepted the "Read_pi command " ,which use scalar value ,which is too floating for me .

If you will want learn it ,here the documentation :

Re: Send receive uart problem

Verfasst: Mittwoch 4. Januar 2017, 15:02
von IKT
Hi TOURNEUR,

my conclusions, so far:
1) you can't use "String" to send, you'll have to use "Send-Byte(s)" or similar. (the same goes for receive ...)
2) PI in Manual refers to "Proportional Integral" Filter (not related to math. PI = 3.1415...)
3) you can use Byte(s) as decimal or hexadecimal (as you like, just: don't "mix" them).
Details of each command, are explained in detail, in the Manual.

Good luck.

Re: Send receive uart problem

Verfasst: Donnerstag 5. Januar 2017, 09:44
von abacom
Refer to protocol description in device manual.

You may take advantage of this...
viewtopic.php?f=53&t=4130

Re: Send receive uart problem

Verfasst: Dienstag 31. Januar 2017, 19:48
von TOURNEUR
Hello ,

In first time ,i would send all my apologies ,at my late reply since the last post from the administrator .

To replies at this last post ,the module send/receive work perfectly at my request .

Directly in decimal format (easier to interpret during test )

I recopied the exemple fom the module request / response and modify it for my proper program .

And all work so fine !



Many thanks ,at the forum for your help !