Link to home
Start Free TrialLog in
Avatar of cyberlab
cyberlab

asked on

Serial port rs232 comunication bi-directional mode maby php and visual basic

Hi, I need some Best ideas for a project that I am building,

I need create a standart way software solution to comunicate with many medicaL instruments,
like : ADVIA,CELL DYN, COBAS, PENTRA, CENTAUR, etc,
each instruments have their own standart data code comunication,
like :ABX,ASTM,H7,CVS,ARGOS,etc

the protocol comunication to all instruments is the same:
RS232 NULL MODEM db9 or db25 PINOUT, I have not ptoblems with the phical layer.

how this work:
intrument ask to pc for a worklist, pc send worklist data
when the instrument has finished all worklist task send the results back to pc.

the solutions that I am thinking is:

1.- Develop all in php, but can php listen in com1 in windows enviroment?
2.- create an visual basic script, for manage the serial comunication data as a proxy, and find the best way to integrate this application to php( that php processe requested data, making conection to database.
in this case is an hibrid solution

Avatar of giltjr
giltjr
Flag of United States of America image

http://php.net/manual/en/function.fopen.php

seach for com1 and you will see some code that shows you how to write to COM1.  This may help you get started.
I have written many apps using RS232 back in the old days way back in 76. Under Windows the problem with RS232 was a physical limit to the devices that you could connect to. But using USB and some kind of driver this limit may have been overcome.

What type of physical connection system are you going to use? Does it have any limits?
Avatar of cyberlab
cyberlab

ASKER

the application will be installed for manage one unique serial port this ou focos for simplicity.
that for each serial port we need only clone the aplication and install, normally each pc have 3 instruments not more, but not have limitation.

giltjr:

yes I  have starter dear, before post here, the question is more conceptual, that what is more better solution, stable,etc.
ASKER CERTIFIED SOLUTION
Avatar of inthedark
inthedark
Flag of United Kingdom of Great Britain and Northern Ireland image

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
nice model, this is very pointting in the rigth way, in this midle time, I have aready made same decision:

-Clients will have an small exe, acting as a port gateway serial/tcp in bi-directional mode, listen for connection started from any side. I have writed 90%

-Server willbe an php socket server runing in linux as a backgound process. 10% only for test.
and here we are posting this asks for this:
https://www.experts-exchange.com/questions/26868024/php-socket-server-handler.html


-At server side we are searching a create a standard way for normatize all direntes fiels coming from all devices, if you wan I have opened another post about this here:

https://www.experts-exchange.com/questions/26868015/php-ASTM-protocol-standard-parser.html

in general, what is the best for manage rs232 basic data comunication?
in the small exe, (like ACK ENQ commands response interacting for data transmition) or at the tcp server we do all control data as the ACK ENQ and all data adquisition/tramsmition.



regards
inthedark have partially helped in the solution
B: The Expert(s) provided an acceptable solution, or a link to an acceptable solution. May assign if you needed a bit more information to complete the task.