422,734 Members | 1,335 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 422,734 IT Pros & Developers. It's quick & easy.

RS232 Simple Program Visual Basic Office 365

P: 1
Hello,

I used to be able to write small programs in Basica long time ago !!
I never catchup with VBA.
Maybe it is still time!

I just would like to interrogate a dosimeter on regular base every 10 seconds, or every so many minute, for testing it for current leak.

My PC run Windows 10 Pro and I use Office 365, and Excel for VBA.

The command I should send for getting the dose is MV for every request I send

The answer is as follow:

MV; 0.5E-09;2; 0.0E-09;2;54.00;00004;00000;49125

The data are separated by ;

In this exemple the dose I am interested is the second groupe of letter 0.5E-09 and the time is 54.00

The information I like to record in an Excel format or text to make a graph or a table is the dose and the time


After having send the command MV, I would be interested to know the unit of the dose and for that I should send the command:

URE

and the system will answer:

URE;11

11 means Gray, 12 means Roentgen and 1 means Ampere which is Current generated by the x-ray diod

Below are some commands and answers collected with Tera Term

MV

MV; 0.0E-09;2; 0.0E-09;2; 2.00;00004;00000;37826

MV

MV; 0.0E-09;2; 0.0E-09;2;14.50;00004;00000;50702

MV

MV; 0.5E-09;2; 0.0E-09;2;54.00;00004;00000;49125

URE

MV

MV; 0.5E-09;2; 0.0E-09;2;112.5;00004;00000;38677

URE;11


Later, I could try to send more complicated commands to setup the dosimeter like:

API;8;CT ;T30009;000948;Mo 28kV ;30Mo ;30Mo+2Al ;0;2008;09;05; 5.952E4; 5.487E4


Hoping that someone would be able to give me a jump start for this new beginning ......

Thanks and Best Regards

Patrick
Mar 11 '18 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.