I´ve a microcontroller reading a ADC (Analog-to-Digital) which have 3 channels, but the software i use to plot the data doesnt work with multiple channels, so i can only read one channel from the ADC.
The software only can read numbers from the ADC, so my idea is to:
The hub4com includes the similar functionality (1 byte tag then 1 byte data).
See hub4com's ReadMe.txt - Multiplexing (it's use the tag filter, see "hub4com -help=tag").
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The multiplexer.bat will wait for the Server to send the tag, to understand which port to send data. Since i´m not correctly sending the "tag", i´m not receiving anything from the COM5 (CNCA0) and COM6 (CNCA1)
For testing i´m using this on the microcontroller:
But i cant get anything from COM5 and COM6, i´m trying to find what is the default tag that multiplexer.bat creates, is:
"tag1" or "1" or "tag.IN", etc?
Knowing what the multiplexer.bat creates for default tags i should get this working.
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
So, now i´m running at 100%! I think at 300SPS i have some packets lost, but since i only need up to 100SPS it works perfectly, no packets lost running for more than 24h.
I appreciate a lot your code and support. It was a tremendous help.
Best regards,
nadabro.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi..
I´ve a microcontroller reading a ADC (Analog-to-Digital) which have 3 channels, but the software i use to plot the data doesnt work with multiple channels, so i can only read one channel from the ADC.
The software only can read numbers from the ADC, so my idea is to:
-The microcontroller sends:
CH1 9831
CH2 5329
CH3 1293
comOcom picks the CH1 data, remove the "CH1" tag and sends it to a specific virtual serial port. So:
CH1 goes to Virtual Port X
CH2 goes to Virtual Port Y
CH3 goes to Virtual Port Z
CH1 9831 --> 9831 ---> Virtual Port X
CH2 5329 --> 5329 ---> Virtual Port Y
CH3 1293 --> 1293 ---> Virtual Port Z
com0com is able to do this? If so, a simple script will work? Do you have any example?
I appreciate any help.
Best Regards.
The hub4com includes the similar functionality (1 byte tag then 1 byte data).
See hub4com's ReadMe.txt - Multiplexing (it's use the tag filter, see "hub4com -help=tag").
Thanks for the answer vfrolov.
Indeed multiplexing is what i need, looking at the readme i only need to run the multiplexer.bat on client side.
But i´m a bit confused how to use the tag filter, will it run using multiplexer.bat or in hub4com? Do you have a example how to create a tag filter?
Thanks.
See hub4com's ReadMe.txt - FAQs & HOWTOs, 1st question.
Hi.
I dont know how to make this working, if anyone have a working example i appreciate a lot..
The only thing i know is to split the serial ports correctly, removing the tag and redirects to specific virtual serial port i completely lost.
Thanks.
If i use the Multiplexer example only from the client side:
multiplexer -baud 115200 COM4 -mode server CNCA0 -mode client CNCA1 -mode client
The multiplexer.bat will wait for the Server to send the tag, to understand which port to send data. Since i´m not correctly sending the "tag", i´m not receiving anything from the COM5 (CNCA0) and COM6 (CNCA1)
For testing i´m using this on the microcontroller:
But i cant get anything from COM5 and COM6, i´m trying to find what is the default tag that multiplexer.bat creates, is:
"tag1" or "1" or "tag.IN", etc?
Knowing what the multiplexer.bat creates for default tags i should get this working.
Thanks.
multiplexer.bat uses tags '0', '1', '2' …
If you'd like to send "123" to 1'st port and "666" to 2'nd port then send "010203161616" or "011602160316".
Thanks for explaining how multiplexer adds tags.
So my microcontroller is sending:
010203161616
In my pc:
multiplexer -baud 115200 COM4 CNCA0 CNCA1
I cant get nothing from COM5 and COM6, looking to the "schematics" that multiplexer creates after sends the command, everything should work:
http://imageshack.us/photo/my-images/38/multiy.png/
multiplexer.bat uses binary tags (not ascii) 0x00, 0x01 …
It also uses RFC2217 telnet.
So try this bat file:
The *.bat Its working! Thanks!
Sending "010203" and "151617", works perfect.
Just a last question, how can i make to send data to a new line?
Sending Serial.println("010203") (ln stands for new line), it does not work. Also adding a 0 or 1 to the final of each message it also doesnt work.
I appreciate the help.
Most languages have print method.
So try Serial.print("0102030\n") or Serial.print("0102030\r0\n")
Hi vfrolov.
This line worked for me: Serial.print("0\r0\n");
So, now i´m running at 100%! I think at 300SPS i have some packets lost, but since i only need up to 100SPS it works perfectly, no packets lost running for more than 24h.
I appreciate a lot your code and support. It was a tremendous help.
Best regards,
nadabro.