MsComm Control in Citect

captain_is

Member
Join Date
Mar 2009
Location
Romania
Posts
57
Does anyone know how to use the MSComm control with citect to send values over the serial port?

I did something like this in Cicode:

FUNCTION
test()
_OBJECTSetProperty(ObjectByName("AN37"),"PortOpen", 1);

_OBJECTSetProperty(ObjectByName("AN37"),"Output", 0x52);
END

And i associated this function with a buton, but i see nothing happens.. i don't use ComWrite function because i need to send hex values not ascii..
Any ideea for my problem..

Thanks in advance!
 
Does anyone know how to use the MSComm control with citect to send values over the serial port?

I did something like this in Cicode:

FUNCTION
test()
_OBJECTSetProperty(ObjectByName("AN37"),"PortOpen", 1);

_OBJECTSetProperty(ObjectByName("AN37"),"Output", 0x52);
END

And i associated this function with a buton, but i see nothing happens.. i don't use ComWrite function because i need to send hex values not ascii..
Any ideea for my problem..

Thanks in advance!

Sorry i didnt see this before.
You can send hex values over ComWrite(). Just use StrSetChar() to build up your databuffer that you pass into ComWrite().

eg
STRING senddata;
StrSetChar(senddata,0,15);

places x0FH into the 1st byte on the Senddata STRING buffer.
 

Similar Topics

Hello Fellow Rockwell Users: I'm new to the industry but I've done some development using the MSCOMM activeX control in VB6. I'd like to use this...
Replies
1
Views
5,257
Hi all, I am setting up a mscomm on wincc,however the mscomm needs to run all the time regardless to which screen i am on as it will then call...
Replies
1
Views
2,468
Hi all, has anyone used MSCOMM in VB6 with OPC ? I have a serious issue with KEPServerEX4.0, VB6 and MSCOMM (Microsoft Comm Control 6.0). I'm...
Replies
15
Views
11,881
Hi I want to use Visual Basic as a front end to talk an Hitachi EH150 PLC (yes an Hitachi PLC !!!). Can anyone point me in the right direction on...
Replies
5
Views
2,234
I am not sure why this is requested, but it was asked. Currently I have one PLC , with one output to a relay, turning on a field equipment (just...
Replies
7
Views
122
Back
Top Bottom