Submitted by Anonymous (not verified) on Sat, 02/18/2012 - 00:00
Forums

Niels,

Can IceBreak Client Services be used to pass data from a RS-232 (serial) or USB attached device to IceBreak?

Regards,
David

Niels Liisberg

Mon, 02/18/2013 - 00:00

Hi David;

Great question – and in fact it can. I have never tried it but a wild guess will be to let the stream file service connect to the COM port and then do Ajax call directly to that.

What kind of data are we talking about, - can you control the RS-232 data? The reason I ask is - that I doubt it will work if you try to implement at fax or kermit protocol. It will however work for gages and other simple monodirectional datagrams.

If that for some reasons fails then it just requires a little "glue" from us, which I will be happy to provide for any new clients.

Best regards,
Niels Liisberg

Niels,

The device is a scale made by Avery Weigh-Tronix and is currently attached via the serial port of the PC.

The current software is Windows based with a MS Access database.

The customer (an existing one) would like to replace the current software/db with IceBreak.

Regards,
David

Hi David;

I just had a little play with it, downloading a tool called com0com which can be plugged into IceBreak client services, but I don't find it stable – simply to many moving parts:

However I think it will be more easy to just mount the scale to a MOXA NPort 5110A RS-232 box – the same we are using for SMS – communication and BlueFax.

Then you can handle the data from the scale directly from an IceBreak user defined Server: simply write/update a record to a file for each "bleep" from the weight. And poll the record by a small AJAX REST service in your IceBreak application.

You need to configure the MOXA as a "client" - it will connect to specific URL .. Your IceBreak user defined server name and port.

IceBreak userdefined servers are simply a TCP/IP RPG program. I have made a sample for you which you can download from here: http://demo.icebreak.org/webfiles/download/USRSRV.4zs

It is a ZipSeries save file containing the complete library. You can download the free zipSeries from here if you don't have it yet: http://www.system-method.com/ZipSeries

When you use a "Userdefined server / service" you simply create a new IceBreak server instance, with the type of *SVC and enter the name and library for your user defined server.

In the attached sample it is called SRV010 and the library is USRSRV. Now use ADDICESVR/CHGICESVR (see screen shot 1).

This user defined server will work as any other IceBreak server. You can use STRICESVR, ENDICESVR – and it will start automatically if startup type is *AUTO. The interface and port number are configuration parameters which are in your entry plist (see screen shot 2).
 
Best regards,
Niels Liisberg

Hi David;

I have worked a little more with RS-232 to IceBreak and found a simple alternative: - Actually the IceBreak Client Services provide a very simple solution:

Simply create a small program.exe that reads the RS-232 and place the output on stdout. The IceBreak Client Service can read and wrap that to REST service you can call from your IceBreak application.

I have read the Weigh-Tronix documentation, and it is no rocket science to pull out the values. You need however a small C# or VB to send the "W" command and receive and produce and convert the output. And of cause I will help you with that.

What you need to implement is the protocol found here:
http://www.averyweigh-tronix.com/Global/Products/Postal%20scales/Postal%20Software%20Downloads%20and%20Drivers/NCI%20Protocol%20Serial%20RS232%20Drivers/WT%20Comm%20ActiveX%20Control/Document%203-%20NCI%20Standard.pdf

Best regards,
Niels Liisberg