tobien
(Lurker)
2002-05-12 11:53 AM
RS232

HELP
I am using a multimeter which is sending data’s over a rs232 serial line to my comport1. I want to log some data when the kix script is started. Is this possible?
[Confused]


NTDOCAdministrator
(KiX Master)
2002-05-13 07:31 AM
Re: RS232

Hello tobien and welcome to the board.

Sure... you should be able to simply do this.

DIR COM1

Not much of anything normally, but your meter should show access on the port.


Kdyer
(KiX Supporter)
2002-05-13 07:36 AM
Re: RS232

Oh man Doc.. You are bringing memories back to me now..

I think what you need though is a re-direct to the com port..

Like:
DIR > COM1

tobien - to take off from what Doc has posted:

KIX32 YOURSCRIPT > COM1

Doc, remember these? [Big Grin]

ECHO AT > COM1

Or..
ECHO ATZ > COM1

Or..
ECHO ATH > COM1

Thanks,

- Kent

[ 13 May 2002, 07:38: Message edited by: kdyer ]


NTDOCAdministrator
(KiX Master)
2002-05-13 08:14 AM
Re: RS232

Yeah... actually glad those days are gone.

I'm quite a command prompt junkie still, but hey... knowing when to use command line and when to use GUI pays off.


Les
(KiX Master)
2002-05-13 02:43 PM
Re: RS232

I think both of you are way off base here. Tobien want to read data from the COM port, not send data. I'd have to dig real deep to remember exactly how to do that in DOS. In the (distant) past, I would redirect input from CON to COMx to block keyboard input. It was the MODE command, but do not remember the exact syntax. I doubt you could do that in NT these days though.

I would think some 3rd party communications prog would be the best bet. Maybe someone talented could make HyperTerminal work.


BrianTX
(Korg Regular)
2002-05-13 05:45 PM
Re: RS232

You can get a third party utility to do it.. or write your own program.. Here is how Microsoft says to do things:

http://support.microsoft.com/directory/article.asp?ID=KB;EN-US;Q64108&

Brian


NTDOCAdministrator
(KiX Master)
2002-05-13 08:08 PM
Re: RS232

I'm not doubting you Les, but generally speaking a "Multi-Meter" recieves data, it does not send data. Not that there is not some meter out there that does send data.

I guess Tobien can post an update and let us know for sure what it is he is trying to do.

[ 13 May 2002, 20:09: Message edited by: NTDOC ]


Les
(KiX Master)
2002-05-13 09:40 PM
Re: RS232

EH DOC,
I'm not doubting you Ron, but...

Just going by tobien's words "multimeter which is sending..."


Sealeopard
(KiX Master)
2002-05-13 10:13 PM
Re: RS232

I agree with Les. I suspect it's one of those (Fluke) Multi-Meters with a serial port that sends the multimeter measurements via serial port to a computer for acquisition.

tobien
(Lurker)
2002-05-13 10:24 PM
Re: RS232

A multi meter is giving a value out onto its display or to a computer via rs232. This value shall be used to make decision in Kix. The value can be a temperature, an electric value as Amp; Voltage, Resistor Capacitor or radiation ....
Kix is running on w2k and it is easy to writ it in qbasic, but qbasic in not running correctly under w2k. The w2k kernel is stopping all access to the ports


tobien
(Lurker)
2002-05-13 10:29 PM
Re: RS232

Jens is totally right with a Fluke Multi-Meter

Marc Tobien


Les
(KiX Master)
2002-05-13 11:07 PM
Re: RS232

I bet Perl could do it. Where's a good Perl programmer when you need one?

Does anyone know if there's something that could be done with COM?


Sealeopard
(KiX Master)
2002-05-13 11:34 PM
Re: RS232

The Platfrom SDK November 2001 says the following about 'comm/datamodem/portname':
quote:
The comm/datamodem/portname device class consists of the device names to which modems are attached. When this device name is specified in a call to the lineGetID function, the function fills the VARSTRING structure with a null-terminated ANSI (not Unicode) string specifying the name of the port to which the specified modem is attached, such as "COM1\0". This is intended primarily for identification purposes in the user interface, but could be used under some circumstances to open the device directly, bypassing the service provider (if the service provider does not already have the device open itself). If there is no port associated with the device, a null string ("\0") is returned in the VARSTRING structure (with a string length of 1).

So, according to this, there are provisions to read the data. But, not knowing the communications protocol used by the multimeter, I doubt it'll be doable in kiXtartat all. I would rather use some kind of command-line data logger that reads the data into a text file. Afterwards I can parse the text file with KiXtart and do whatever needs to be done with that data.
That reminds me, it would be nice to be able to define a function based on a call to a DLL as can be done in Visual Basic.