It is currently Wed Mar 29, 2017 9:17 am

All times are UTC




Post new topic Reply to topic  [ 27 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Mon Jan 23, 2017 8:52 am 
Offline
Member
Member

Joined: Sat Jan 14, 2017 11:14 am
Posts: 15
OK, I'm back this morning and immediately applied your instructions. Once comOcom tuned, RealTerm's echo port tab shows bottom left TXD in yellow, but not blinking. I then started PCLink as an admin (downloadable version on Velleman's web). The ports proposed in the list, in my case COM20 and COM21 are the comOcom pair because the lower numbers were all allocated it said. I therefore selected port 21, which it answered instantaneously: INVALID PORT NUMBER. Il also tried with the two other versions of PCLink without more success. But using PCLink 6000 and seeing it scanning COM ports from 1 to 10, I realised that probably no PClink version was designed to accept a port number over 10. I then went back to comOcom and forced it to accept COM numbers between 1 and 10, being sure that nothing was physically connect to the said numbers. Using again the last PClink version, I retried to connect. COM9 port, the second port declared in comOcom, was effectively seen by the software and its selection accepted. When I clicked the start button, it happened... nothing :((((((((((((((((((((((((((((((((((((((((


Top
 Profile  
 
PostPosted: Mon Jan 23, 2017 9:56 am 
Offline
Member
Member

Joined: Mon Jan 16, 2017 2:16 pm
Posts: 11
Let verify if there was actual output on your COM9 port.
So if I understand it correctly your connection flow looked as follow:

[device | output ] → [input | program | output] → [input | program | output ]
[Mulitmeter | cable] → [COM3 | Realterm | COM?] → [COM9 | pc-link | nothing happend :( ]

Where you didn’t mention which port was COM?, but COM? and COM9 should be your com0com pair. The TXD in the realterm echo tab should only start blinking when actual data is received through COM3, otherwise realterm has nothing to forward.

So to check if COM9 actually received data let replace the pc-link software by another realterm program. You can start a second realterm instance by right click on the realterm icon in your taskbar and select “realterm” when it starts it could give an error about the fact it can’t open a COM port, just ignore it. Ok, so now select in this second realterm instance the “Port” tab and open COM9, also you could set the “display as” to hex[spaces] if you want in the “display” tab such that you can verify the incoming data. It should look like 1x 2x 3x 4x 5x 6x 7x 8x 9x Ax Bx Cx Dx Ex where x is some value (which is not the same for each 1x 2x....) . So the connection path will look as follow:

[device | output ] → [input | program | output] → [input | program | output ]
[Mulitmeter | cable] → [COM3 | Realterm | COM8] → [COM9 | Realterm | data to window ]

It is important that COM8 and COM9 is your com pair from the com0com program. (I just choose COM8 and COM9). I think you could be right about the fact the pc-link software only accepts COM ports below 10, the software is shit so it doesn’t surprises me…

Let me know what data you received in your second realterm instance.


Top
 Profile  
 
PostPosted: Mon Jan 23, 2017 12:40 pm 
Offline
Member
Member

Joined: Sat Jan 14, 2017 11:14 am
Posts: 15
Here is a screenshot of Realterm showing my ports. Do you think there is a mistake ?

https://we.tl/Db7ot95U7B


Top
 Profile  
 
PostPosted: Mon Jan 23, 2017 1:35 pm 
Offline
Member
Member

Joined: Mon Jan 16, 2017 2:16 pm
Posts: 11
Port numbers look fine.

So your setup will be: open COM17 in the first Realterm application and select COM2 in the "echo port" tab (don't forget to set the 'echo on' checkmark.
The second Realterm application should open port COM9. When you now set the multimeter in pc-link mode, your should see data flowing in both Realterm windows. Can you test this?

[device | output ] → [input | program | output] → [input | program | output ]
[Mulitmeter | cable] → [COM17 | Realterm | COM2] → [COM9 | Realterm | data to window ]

Only If you see data in both Realterm windows you can close the second Realterm application (the one where you opened COM9). Open now the pc-link software and open port COM9. If you don't see data in the second Realterm window we need to investigate what went wrong.


Top
 Profile  
 
PostPosted: Mon Jan 23, 2017 2:08 pm 
Offline
Member
Member

Joined: Sat Jan 14, 2017 11:14 am
Posts: 15
Unfortunately nothing happens in the second window, as you can see here: https://we.tl/eaA9VlLIlO


Top
 Profile  
 
PostPosted: Mon Jan 23, 2017 2:27 pm 
Offline
Member
Member

Joined: Mon Jan 16, 2017 2:16 pm
Posts: 11
hmm indeed that's a problem.
Could you open in realterm window 1 COM2, disable the echo checkmark and in the other realterm window COM9.
now place your cursor on one of the black windows (where you normally see the incoming data) and click there. Now start typing random things with your keyboard.
You won't see what you type but the other realterm window should show it. Another method is to go to the "Send" tab and type some random characters in the top input field, then press "Send ASCII". Now it should also appear the the other realterm window. If not perhaps your com0com configuration is not working.

Screenshot of my com0com settings: https://we.tl/7zpZLy1ol4 (They are all default btw)


Top
 Profile  
 
PostPosted: Mon Jan 23, 2017 3:18 pm 
Offline
Member
Member

Joined: Sat Jan 14, 2017 11:14 am
Posts: 15
Sorry ;) but this works fine : If I play a sonata of Choppin on my Keyboard threw the first window, a burst of hexa numbers scrolls on the second. But contrary to what I see on your screenshot, my device manager doesn't mention any COM port except COM1 that is permanently connected to my 12 years old weather station fitted with a RS232 link: https://we.tl/WdM3uZfQpV

Strange, isn't it?


Top
 Profile  
 
PostPosted: Tue Jan 24, 2017 8:42 pm 
Offline
Member
Member

Joined: Mon Jan 16, 2017 2:16 pm
Posts: 11
No it is not that strange. The com ports of com0com are listed under another category called "com0com - serial port emulators". I see it in your screenshot too.

But this means the com0com ports work, so the port echo function of Realterm doesn't seem to work on your computer. Could you, to be 100% certain, try the port echo function again? In the meantime, I will try to write a simple program which forwards the com port to another one. So basically the same thing as the port echo function in Realterm does but then I will also try to filter the data such that only data is forwarded which meets the requirement: 1x 2x ..... Dx Ex.

This will take some times since I have no experience with programming COM ports and I have higher priority tasks in the pipeline too ;-) Anyway probably somewhere next week I hope you can test some parts.
Btw do you know how to run a python script? since perhaps that will be the fastest way to develop/test, no problem if you don't.


Top
 Profile  
 
PostPosted: Wed Jan 25, 2017 5:50 am 
Offline
Member
Member

Joined: Sat Jan 14, 2017 11:14 am
Posts: 15
If it's just running a Python script, I can do that! I set myself the goal of learning Python some time ago because I would need it for my current projects, but I move slowly. I programmed in Basic at the time of the Sinclair ZX80, but since nothing, then I have a lot of new concepts to integrate and neurons to unblock. But just launching a script, yes I can ! By the way Python 2.7 is already installed on my machine.


Top
 Profile  
 
PostPosted: Fri Feb 03, 2017 9:01 am 
Offline
Member
Member

Joined: Sat Jan 14, 2017 11:14 am
Posts: 15
Hi,

This is just to inform you that I made some tests with a 10 years old DELL laptop running W10 and the result is also negative. The COM port is properly detected by PC-Link, but as soon as I enabled the pc-link mode on my multimeter, error messages are poping up endlessly. I'm not sure it helps to understand the issue, but...

Laurent


Top
 Profile  
 
PostPosted: Sat Feb 11, 2017 7:46 pm 
Offline
Member
Member

Joined: Mon Jan 16, 2017 2:16 pm
Posts: 11
So I finally had time to write the python script and I hope it will work for you. I tested it with the data file you send me and it looks promising. you can download the python script here: https://we.tl/qrw06uuDMz

The script uses the pyserial library to connect to your com port. If you don’t have this library you can install it by typing “pip install pyserial” (without the quotes) into the windows command prompt. To run the script type “python dvm1200.py -i <input port> -o <output port>” into the command prompt where you need to replace <input port> by the profilic com port connected to the multimeter and <output port> by one of the com ports of the com0com. So for example if COM3 is connected to the multimeter and COM8 and COM9 are my com0com pair I would type: python dvm1200.py -i COM3 -o COM8
Now all the incoming data from COM3 is redirected to COM8. My script doesn’t only redirect, it also does some specific error checking on the incoming data such that only valid data is forwarded to COM8 which will prevent the popup of error messages in the pc-link program.

The best order to connect everything is as follow:
- connect the multimeter to the pc (don’t enable the PC-LINK mode yet)
- start my script with the correct input and output port. leave it open in the background.
- start the PC-LINK software (the version you can download from the velleman website) as administrator and set the corresponding com0com pair port as input. So in my case this would be COM9 since COM8 was used as output in my python script. When the correct COM port is selected press “start”.
- Enable the multimeter in PC-LINK mode.

Now fingers crossed and everything should work. My python script will print the incoming/forwarded data to the command prompt. Also there is a counter which increases only if data is successfully forwarded.


Top
 Profile  
 
PostPosted: Mon Feb 13, 2017 10:13 am 
Offline
Member
Member

Joined: Sat Jan 14, 2017 11:14 am
Posts: 15
Dear Sir, I must tell you that it works !!! And I prove it: https://we.tl/OxXB0eBMIi.

It's really great what you did. I read the script, for me the Chinese Mandarin is much more comprehensible, but the bottom line is that it does! And you did it! Congratulations and a thousand thanks!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 27 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group