Send receive uart

Antworten
TOURNEUR
Beiträge: 35
Registriert: Samstag 22. Mai 2010, 23:56

Send receive uart

Beitrag von TOURNEUR » Mittwoch 28. Dezember 2016, 19:39

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 ...
Dateianhänge
Emit receive UART3.PNG
Emit receive UART3.PNG (90.97 KiB) 5466 mal betrachtet
Emit receive UART2.PNG
Emit receive UART2.PNG (108.93 KiB) 5465 mal betrachtet
Emit receive UART.PNG
Emit receive UART.PNG (26.89 KiB) 5462 mal betrachtet

QMESAR
Beiträge: 26
Registriert: Donnerstag 16. April 2015, 12:17

Re: Send receive uart problem

Beitrag von QMESAR » Donnerstag 29. Dezember 2016, 07:38

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

TOURNEUR
Beiträge: 35
Registriert: Samstag 22. Mai 2010, 23:56

Re: Send receive uart problem

Beitrag von TOURNEUR » Donnerstag 29. Dezember 2016, 18:55

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 ?

QMESAR
Beiträge: 26
Registriert: Donnerstag 16. April 2015, 12:17

Re: Send receive uart problem

Beitrag von QMESAR » Donnerstag 29. Dezember 2016, 19:09

Hi

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

IKT
Beiträge: 553
Registriert: Mittwoch 4. November 2009, 18:32

Re: Send receive uart problem

Beitrag von IKT » Samstag 31. Dezember 2016, 00:29

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) 5390 mal betrachtet
++++++
Gruss/regards IKT

TOURNEUR
Beiträge: 35
Registriert: Samstag 22. Mai 2010, 23:56

Re: Send receive uart problem

Beitrag von TOURNEUR » Montag 2. Januar 2017, 19:21

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 ...

IKT
Beiträge: 553
Registriert: Mittwoch 4. November 2009, 18:32

Re: Send receive uart problem

Beitrag von IKT » Montag 2. Januar 2017, 23:27

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.
++++++
Gruss/regards IKT

TOURNEUR
Beiträge: 35
Registriert: Samstag 22. Mai 2010, 23:56

Re: Send receive uart problem

Beitrag von TOURNEUR » Dienstag 3. Januar 2017, 19:15

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 :
Dateianhänge
Motor mind B.pdf
(100.65 KiB) 156-mal heruntergeladen

IKT
Beiträge: 553
Registriert: Mittwoch 4. November 2009, 18:32

Re: Send receive uart problem

Beitrag von IKT » Mittwoch 4. Januar 2017, 15:02

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.
++++++
Gruss/regards IKT

abacom
Site Admin
Beiträge: 3415
Registriert: Dienstag 23. September 2008, 10:54
Kontaktdaten:

Re: Send receive uart problem

Beitrag von abacom » Donnerstag 5. Januar 2017, 09:44

Refer to protocol description in device manual.

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

TOURNEUR
Beiträge: 35
Registriert: Samstag 22. Mai 2010, 23:56

Re: Send receive uart problem

Beitrag von TOURNEUR » Dienstag 31. Januar 2017, 19:48

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 !

Antworten

Zurück zu „Thema RS232“