Sign in to follow this  
Followers 0
lchamarthi

VB Commands Trace

8 posts in this topic

Hi All, We have a Visual Basic software to control & monitor the process parameters of one Power supply (which controls the Lamp). Ultimately the control parameters will be 1. Setting the rated voltage 2. " Current 3. Burn In Lamp Current 4. Read the Lamp Status 5. Read the Power Supply condition (for power failure,over volatge...etc) etc Now we have only the compiled software of VB for above & we lost original source code for this software.. This software talks to the power supply through the following protocol..shown different for Command & reply.bmp in different images. Commands & INTIAL COMMAND will come from VB software as a master. Reply will come from power supply. Now I wanted to trace the commands from VB. So I traced intial command using Hyper terminal connectivity of 2 PC's.I was running software in 1PC & another PC Command tracing using the Com Test Software. Like wise i traced first command from VB. It is attached as intial command & format understood like this <02><01>@<02>]<E0> As per the Command structure format attached above <02> Header <01> Node @ -40 Command <02> Length ]<E0> ---5DE0 CRC Some of the bytes doesn't have format <> becuase @ & ] are printable characters if we see from ASCII table.it is keep on repeating the same command in between with some format B<FE>B<FE> until it gets response from Power supply as attached . what is this B<FE>B<FE> stands for? I couldn't understand. Now instead of powersupply i am trying to give reply to VB Command. I tried in the Reply Format attached first. But what should be the correct format of the reply?. If i give the correct format then VB will proceed to next Command. Like wise I am trying to trace from VB commands..... Please find the attached Images for Command, Reply structure & Repeated running command image. Is there any other best method for doing this (Tracing the commands one by one) thing in better way? Please suggest me! Your reply will save me from trouble.If any clarifications please mail me. Thanks in advance Lchamarthi Command.bmp Reply.bmp Repeat_Command.bmp Edited by lchamarthi

Share this post


Link to post
Share on other sites
Have I put the above topic in correct section or not i don't know. Because I didn't get any response. Please let me know to which section i should move this topic? Lchamarthi

Share this post


Link to post
Share on other sites
This is the correct topic. I am not sure why you are getting those responses from the power supply. Do you have the correct protocol to talk with this power supply? If so, forget about tracing and write a new program. If not, I am not able to help with the information you provided. Edited by GerryM

Share this post


Link to post
Share on other sites
Instead of using two PCs to test the software, try this. Install a serial port monitor program on the PC that talks to the Power Supply. This will show you what the VB program sends to the power supply and what the power supply's response was. (the one I've seen uses different colors to indicate what direction the data is moving in.) If you are doing serial port programming, you need this type of utility. Good luck, Edited by mellis

Share this post


Link to post
Share on other sites
please post pictures in compressed format (GIF, JPEG,...). what is the model of the power supply? do you have programming manual for it (how did you make screenshots of command and reply)?

Share this post


Link to post
Share on other sites
Hi Mellis! Thanks for your suggestion. You are very correct to my approach. Again after posting my topic further progress is.... I took two 232/485 converters & 2 PC's one installed with VB software & another one with Serial Port tester software (Com test from B&B electronics). Now i made a set up such that 1.using first converter & VB installed PC talking to the Power supply on 485 Half duplex. 2. connect/take same 485 signals at first converter & using second conveter convert it to 232 and give it to second PC which has Com Test software. 3. I tried to power on & communicate through the First PC, First converter using VB software. 4. I could get intail command as attached very first of this topic. Now As Power supply is connected, it is going for further commands but running on the software. So I captured with by pressing CTRL+Print Screen in the paint. 5.when i trace the captured commands, i feel intial command reapeated twice and after B<FE>B<FE> as i said earlier in the middle Again second command not the reply. All in thesame color. So i feel what i captured is only commands from VB not the reply from Power supply. Now the latest response i attached in the image for ur reference. But May i know which serial test software you are talking about which differentiates the command & reply by using color. This will help in defferentiating both otherwise whether we are getting only single side response. Your early response in this highly appreciable. Thanks in advance.. Lakshmi

Share this post


Link to post
Share on other sites
Hi Mellis! As further progress since morning, as you suggested i searched for serial monitor utility in the net for free vesion & got Free Serial port monitor 3.0.0.1 software from HHD. When opened this software alone with Data view option when communication is happening b/n VB & power supply, it didn't show anything. But when i opened along with as i told u earlier Com Test software from B&B electronics i opened...data is running in this software (i can't see the first commands as it is running) but it is accumulating in Free serial port monitor software as attached. Here problem solved using Serial port monitor software is accumulated sequential data in the Read area & could get directly in Hex Decimal form (oprion available in Serial port Monitor). But as you said there is no color distiguish between VB commands & Power supply replies (VB Soft is Master & P S is slave) available in this software. Otherwise it is showing only one device i.e.VB commands only it is showing? I have doubt..... To get to view both device communication with color segregation what needs to be do in the both Hardware connevtivity (my set up i explained above) or software...? Thanks Lchamarthi

Share this post


Link to post
Share on other sites
The software in your screen shot has two separate windows for transmit and receive. All your data is in the same window. That means it's all moving in the same direction. If the system is operating as expected, I would conclude that the power supply does not send responses.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0