Link to home
Start Free TrialLog in
Avatar of cwi2k
cwi2k

asked on

serial communication

hi i am trying to send data via the serial port it is sending ok as i can read it on a program that i have monitoring the port. the problem i have is that the device it is talking to is not recognising the command, the rx light comes on but it doesnt do anything i think it is due to the length of the data going out.

on the other program i wrote for this device it has a length of 1 for each bit that is sent according to the monitoring program so 50 is the first code send and the program says Length 1: 50 when i send it using the vb comm control it says Length 2: 50 and i am sure this is why it is not working. i cannot find the origional code i used to write this program so if anyone can help me. the information is send as hex codes and i cannot figure out how to send hex codes as vb seams to send them as ascii. i would value any help anyone can give.

thank you
Avatar of Kalimac55
Kalimac55
Flag of France image

Let's see if I understand what you are saying. You try to sent a command '50' to a monitoring device but that device is not accepting the command.
The format of the message sent is <length><command> and you are saying the length should be 1 and the command '50'. Are you sure you are not sending '5' and '0' (length 2). This might also explain you're ascii comment.
Avatar of cwi2k
cwi2k

ASKER

hi i have my device which is a motor controller, and the software i already have sends 50 to it. i also have software monitoring the com port which says that the length of that 50 is 1, where as when i send the 50 in vb it says the length of the string is 2 as in a 5 and 0 not 50, i am sure that it is something to do with hex but i have tried &H50 and the device does nothing though i have not checked the monitoring program yet.

the origional program was written in delphi about 4 years ago but i have lost the source code for it.

thank you for your response
Have you tried sending the result of Chr(&H50)?
cwi2k:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
Avatar of cwi2k

ASKER

hi sorry none of those answers worked, what i did (after messing around with the code) was

can i get a refund

thanks anyway
This question has been classified as abandoned.  I will make a recommendation to the moderators on its resolution in a week or two.  I would appreciate any comments by the experts that would help me in making a recommendation.
It is assumed that any participant not responding to this request is no longer interested in its final deposition.

If the asker does not know how to close the question, the options are here:
https://www.experts-exchange.com/help/closing.jsp

GPrentice00
Cleanup Volunteer
cwi2k

If you believe that you found the solution yourself and your points should be refunded, you must post a request in Community Support -- ask a 0 point question asking for a refund, and paste the link to this question.  CleanupPing is an automated system which does not respond, it is meant to get your attention, so that you may close the question or post for help in Community Support to delete, refund, or lower point value for rewarding a smaller amount...

However, I believe that any such request would be questioned by the moderators, unless you could actually fill in the missing part of

"what I did (xxx) was:"

in order to be assured that your solution was independant of Kalimac55's suggestions, and so that others may learn from your experiences in a similar circumstance when this question is added to the PAQ list.
ASKER CERTIFIED SOLUTION
Avatar of cwi2k
cwi2k

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Question is PAQ'd and points refunded.

Regards,

YensidMod
Community Support Moderator @Experts Exchange