Ask about node-red serial?

Dear All :

  1. Press a button.
  2. First send a set of data to serial out.
  3. Second then will response same a set of data to serial in.
  4. Third check a set of data is right then return to 1.
  5. How to check the data? I have no idea!
  6. And I have 5 set of data need to send but just one serial port...

Thank u.

Can I suggest that you reword your post as more of a narrative. I don't think you will get many (if any) useful responses as it is written.

As with any logic problem, you need to break it down. Showing people what you've achieved so far, maybe as an example flow or at least an image of the flow might help people understand and maybe guide you on the next step.

1 Like

Are you checking data transmission from Serial out to Serial in?
For a system test I can suggest this.
First you need to physically connect on your port out to the in. This would be on a serial port not USB. If you use a USB you'll need a USB to serial converter. Lets assume for now you have a 9 pin DIN on your PC. would be connect pin 2 and 3 together. It's commonly called a loop back connector. Then make sure the baud settings on the (out) and (in) are the same. You should be able to pass text to your (out) and receive the text on (in). :grinning:

Once your test results are good and you can send data through the port, then you can connect it to the device. Keep in mind the device should be understood to know what it expects and what it will give you back. Serial port baud configuration is important as well as making sure you connect the Send and Receive. You may need a null modem adapter (swaps Send/Receive terminals). You can also rewire your connector if necessary. Depending if that is the issue.

Dear Sir :

Look at Pics and below :

  1. I want send a set of data 0xaa,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x13,0x06,0x01,0x00,0x00,0x00,0x00,0xff
  2. But logic analysis show is not!
  3. And why RX have data(0xFF)?

Thank u.



Dear All :

How to check UART?Im using USB2TTL.

[{"id":"3bb46aaa.9b6036","type":"tab","label":"流程3","disabled":false,"info":""},{"id":"91ea6062.41f78","type":"serial out","z":"3bb46aaa.9b6036","name":"COM3 TX","serial":"375f7f77.07ad4","x":660,"y":280,"wires":[]},{"id":"66f37508.78891c","type":"serial in","z":"3bb46aaa.9b6036","name":"COM3 RX","serial":"375f7f77.07ad4","x":420,"y":380,"wires":[["b5855b4f.4c7878"]]},{"id":"b5855b4f.4c7878","type":"debug","z":"3bb46aaa.9b6036","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":610,"y":380,"wires":[]},{"id":"83d5bb7.8dfb748","type":"inject","z":"3bb46aaa.9b6036","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"[1,2,3,4,5,6,7,8,9,0]","payload":"","payloadType":"date","x":430,"y":280,"wires":[["91ea6062.41f78"]]},{"id":"375f7f77.07ad4","type":"serial-port","serialport":"COM3","serialbaud":"19200","databits":"8","parity":"none","stopbits":"1","waitfor":"","dtr":"none","rts":"none","cts":"none","dsr":"none","newline":"\\n","bin":"false","out":"char","addchar":"","responsetimeout":"10000"}]

Thank u?

Dear All :

[{"id":"3bb46aaa.9b6036","type":"tab","label":"流程3","disabled":false,"info":""},{"id":"91ea6062.41f78","type":"serial out","z":"3bb46aaa.9b6036","name":"COM3 TX","serial":"375f7f77.07ad4","x":660,"y":280,"wires":[]},{"id":"66f37508.78891c","type":"serial in","z":"3bb46aaa.9b6036","name":"COM3 RX","serial":"375f7f77.07ad4","x":420,"y":380,"wires":[["b5855b4f.4c7878"]]},{"id":"b5855b4f.4c7878","type":"debug","z":"3bb46aaa.9b6036","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":610,"y":380,"wires":[]},{"id":"83d5bb7.8dfb748","type":"inject","z":"3bb46aaa.9b6036","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":430,"y":280,"wires":[["af6b25cc.b69328"]]},{"id":"af6b25cc.b69328","type":"function","z":"3bb46aaa.9b6036","name":"","func":"if(msg.payload==true)\n{\n    msg.payload=[0,1,2,3,4,5,6,7,8,9];\n    return msg;\n}\nreturn null;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":130,"y":400,"wires":[["91ea6062.41f78"]]},{"id":"375f7f77.07ad4","type":"serial-port","serialport":"COM3","serialbaud":"19200","databits":"8","parity":"none","stopbits":"1","waitfor":"","dtr":"none","rts":"none","cts":"none","dsr":"none","newline":"\\n","bin":"false","out":"char","addchar":"","responsetimeout":"10000"}]

Still wrong!Why?

Thank u.

Dear All :

  1. The UART is ok...
  2. But TX doesn't out?
[{"id":"1a9d7a1e.896bf6","type":"tab","label":"瘚?8","disabled":false,"info":""},{"id":"a0c06ac.2675498","type":"inject","z":"1a9d7a1e.896bf6","name":"","props":[{"p":"payload","v":"","vt":"date"},{"p":"topic","v":"","vt":"string"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":470,"y":260,"wires":[["ed3bc132.9751b"]]},{"id":"26ba49b5.3132c6","type":"debug","z":"1a9d7a1e.896bf6","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":680,"y":340,"wires":[]},{"id":"bce63520.e3f298","type":"serial out","z":"1a9d7a1e.896bf6","name":"","serial":"375f7f77.07ad4","x":660,"y":260,"wires":[]},{"id":"c89f88a5.bed2d8","type":"serial in","z":"1a9d7a1e.896bf6","name":"","serial":"375f7f77.07ad4","x":460,"y":340,"wires":[["26ba49b5.3132c6"]]},{"id":"ed3bc132.9751b","type":"function","z":"1a9d7a1e.896bf6","name":"?啣遣?啁?","func":"var temp= new Buffer([0xaa,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x13,0x06,0x01,0x00,0x00,0x00,0x00,0xff]);\nmsg.payload = temp;\nreturn msg;","outputs":1,"noerr":0,"x":570,"y":180,"wires":[["bce63520.e3f298"]]},{"id":"375f7f77.07ad4","type":"serial-port","serialport":"COM3","serialbaud":"19200","databits":"8","parity":"none","stopbits":"1","waitfor":"","dtr":"none","rts":"none","cts":"none","dsr":"none","newline":"\\n","bin":"false","out":"char","addchar":"","responsetimeout":"10000"}]

Thank u

Dear All :

Does com3 is closed?
But in the edit is connected...
if it is ... And how to open it?

Thank u.

Dear Sir :

Look at Pics and below :

  1. COM3 has opend and connected.
  2. Debug windows has data output.
  3. But Logic analysis does has data?
    Why?

Thank u.



Dear All :

It seems ok.
But I still dont know why...haha.
Forgot it.

Thank u.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.