I'm using a GSE scale to weigh product. When the scale sends the weight to my computer, the computer parses out the spurious text, and sends the weight only (e.g. 53.2 kg) to a Domino Macrojet printer.
All this is done using MSCOMM controls, and works perfectly.
When the end of a particular batch is reached, the operator presses the "Scale Select" button on the scale control panel, which activates a total macro.
I know that in theory at least it is possible to send data TO the GSE scale, (and in fact have done so myself). Supposedly, the code to send is the apostophe character, which I have tried sending both as text, and as CHR$(128) (I think). Even this got through, because it appeared in the display of the GSE scale.
BUT it did not activate the macro. Does anyone have any experience of these units. It seems it doesn't matter which model GSE scale is used. They sensibly have the same control codes for all models in this series.
Does anyone have any experience of this kind of issue? If so, what am I missing?
I'm using a XP based computer, running VB6, and using the MSCOMM control throughout. All the modules are working fine, since the project has worked reliably for some time. It's merely this issue of trying to control the scales from the computer that's giving so many problems.
Thanks Howard G
All this is done using MSCOMM controls, and works perfectly.
When the end of a particular batch is reached, the operator presses the "Scale Select" button on the scale control panel, which activates a total macro.
I know that in theory at least it is possible to send data TO the GSE scale, (and in fact have done so myself). Supposedly, the code to send is the apostophe character, which I have tried sending both as text, and as CHR$(128) (I think). Even this got through, because it appeared in the display of the GSE scale.
BUT it did not activate the macro. Does anyone have any experience of these units. It seems it doesn't matter which model GSE scale is used. They sensibly have the same control codes for all models in this series.
Does anyone have any experience of this kind of issue? If so, what am I missing?
I'm using a XP based computer, running VB6, and using the MSCOMM control throughout. All the modules are working fine, since the project has worked reliably for some time. It's merely this issue of trying to control the scales from the computer that's giving so many problems.
Thanks Howard G
I think you are asking how to invoke a macro. According to the manual for the 60 series ("60 Series Technical Reference Manual" page 9-10):
"A macro will be invoked if the %^ Call \ Go To Macro command is received and processed by one of the communication ports. For example, transmitting the macro command 100%^ to the indicator will result in macro 100 being invoked."
I haven't tried this, but it sounds straightforward.
"A macro will be invoked if the %^ Call \ Go To Macro command is received and processed by one of the communication ports. For example, transmitting the macro command 100%^ to the indicator will result in macro 100 being invoked."
I haven't tried this, but it sounds straightforward.
Thanks for replying. It is a macro that I want to invoke, but it's invoked by pressing the "Scale Select" key on the keypanel on the scales.
My problem seems to centre around some control codes working, and others not. For example, if I send the F3 code, the scales behave as though the F3 key on the panel was pressed. But when I send the scale select code, nothing. Also the enter code fails.
I don't have the GSE manual to hand, but I was looking up the codes in the same table in the manual, so I'm pretty sure I was doing something right, especially since some, but not all of them worked.
My problem seems to centre around some control codes working, and others not. For example, if I send the F3 code, the scales behave as though the F3 key on the panel was pressed. But when I send the scale select code, nothing. Also the enter code fails.
I don't have the GSE manual to hand, but I was looking up the codes in the same table in the manual, so I'm pretty sure I was doing something right, especially since some, but not all of them worked.
> the code to send is the apostophe character, which I have tried sending both as text, and as CHR$(128) (I think). <
Is it the ' character or the ` character? They aren't the same. Look over your keyboard and you should be able to find both. ' is 44 (decimal), and ` is 96. I'm not sure where you get 128 from. ASCII covers 0 to 127. Characters from 128 and up are covered by ISO 8859-1. I think the GSE scales use ASCII only.
You said you are using MS Windows, so don't go by what the character looks like on the screen of your PC. Microsoft doesn't use the standard character sets. They have their very own character set (which nobody else uses) called Windows 1252. This is similar to, but not exactly the same as the ANSI or ISO standard. They also have their very own unicode character set, which some parts of Windows use, and that isn't compatible with either standard unicode or Windows 1252.
Character set handling in Windows is a big mess. For characters between 32 and 127, you shouldn't run into problems. For anything else, look it up in a reference chart and don't trust what it looks like in Windows.
Is it the ' character or the ` character? They aren't the same. Look over your keyboard and you should be able to find both. ' is 44 (decimal), and ` is 96. I'm not sure where you get 128 from. ASCII covers 0 to 127. Characters from 128 and up are covered by ISO 8859-1. I think the GSE scales use ASCII only.
You said you are using MS Windows, so don't go by what the character looks like on the screen of your PC. Microsoft doesn't use the standard character sets. They have their very own character set (which nobody else uses) called Windows 1252. This is similar to, but not exactly the same as the ANSI or ISO standard. They also have their very own unicode character set, which some parts of Windows use, and that isn't compatible with either standard unicode or Windows 1252.
Character set handling in Windows is a big mess. For characters between 32 and 127, you shouldn't run into problems. For anything else, look it up in a reference chart and don't trust what it looks like in Windows.
Finally managed to get access to the computer & scales & internet all at the same time.
This code sends F3
MSComm1.PortOpen = True
MSComm1.Output = Chr$(130)
MSComm1.PortOpen = False
It works perfectly.
Using the same table that provided me with the code for F3, I then try sending
MSComm1.PortOpen = True
MSComm1.Output = Chr$(224)
MSComm1.PortOpen = False
which should generate the "Scale Select" button. But... no response.
The same problem exists with the Enter key, which should be
MSComm1.PortOpen = True
MSComm1.Output = Chr$(229)
MSComm1.PortOpen = False.
I notice that it's the codes above 200 which seem to be giving the problem
This code sends F3
MSComm1.PortOpen = True
MSComm1.Output = Chr$(130)
MSComm1.PortOpen = False
It works perfectly.
Using the same table that provided me with the code for F3, I then try sending
MSComm1.PortOpen = True
MSComm1.Output = Chr$(224)
MSComm1.PortOpen = False
which should generate the "Scale Select" button. But... no response.
The same problem exists with the Enter key, which should be
MSComm1.PortOpen = True
MSComm1.Output = Chr$(229)
MSComm1.PortOpen = False.
I notice that it's the codes above 200 which seem to be giving the problem
Your use of this site is subject to the terms and conditions set forth under Legal Notices and the Privacy Policy. Please read those terms and conditions carefully. Subject to the rights expressly reserved to others under Legal Notices, the content of this site and the compilation thereof is © 1999-2010 Nerds in Control, LLC. All rights reserved.
Users of this site are benefiting from open source technologies, including PHP, MySQL and Apache. Be happy.
Fortune
"Wagner's music is better than it sounds."
-- Mark Twain

Servo, stepping motor control, analog & web HMI in one system!
Control.com is the largest Automation community on the web. Learn how to advertise here now...
MatrikonOPC has over 500 OPC interfaces and out of the box software. Find an OPC Server for your devices here.






