RS232 Simple Program Visual Basic Office 365

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Saoude
    New Member
    • Mar 2018
    • 1

    RS232 Simple Program Visual Basic Office 365

    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;0000 4;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;0000 0;37826

    MV

    MV; 0.0E-09;2; 0.0E-09;2;14.50;0000 4;00000;50702

    MV

    MV; 0.5E-09;2; 0.0E-09;2;54.00;0000 4;00000;49125

    URE

    MV

    MV; 0.5E-09;2; 0.0E-09;2;112.5;0000 4;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
    Last edited by Saoude; Mar 11 '18, 11:45 AM. Reason: My text was not clear enought and full of typing mistake. I am sorry for this Patrick
Working...