Siemen CP 340 Rs 232 Module

cotang

Member
Join Date
Aug 2006
Location
calgary
Posts
58
Hello,

I have an int value in my DB and I want to transmit that to hyperterminal. I can send something but it not showing up correctly.

Example, if I have an int value of 100 and when I transmit it, my hyperterminal would see the letter "d" which is correct, but I want the hyperterminal to see "100".

Can someone point me in the right direction. Thanks.
 
You have to convert the integer value to a string and then send the characters from the string one at a time.

FC16 from the IEC conversion library will do the conversion.
 
Last edited:
L D[AR2 said:
You have to convert the integer value to a string and then send the characters from the string one at a time.

FC16 from the IEC conversion library will do the conversion.

Thanks for the reply, is there a way to monitor the Re_value of the function block? I want to see what the value is if I enter 100. Or would that be '1''0''0'?
 
What parameter are you entering for FC16 ? - if its a DB then you can monitor the relevant area of the db using a VAT table - you should monitor each byte as a char. Note that with string variables, the first two bytes specify the max string length and the actual string length.
If you click on FC16 and press F1, the help will tell you the format of the string it produces. There is a sign that you may wish to skip.
 
I'm storing the Re_value into a DB block with a string[10]. I created the VAT table and set it all up but when I try to monitor it I can't select the format to modify as Char. You happen to have an example by chance?
 
You need the absolute address of the start of the string.

Here's an example VAT table:
wasitacat.JPG
 
Last edited:
L D[AR2 said:
You need the absolute address of the start of the string.

Here's an example VAT table:
wasitacat.JPG

Thank you, I'll play around with it some more. I recently took the Siemens Course #1 and its been great but I need to play around with it a lot more to get a handle on things. So far I amaze myself as to being able to do so much but it the little stuff that get me stuck. I'll get back to you on my progress. Thank again.
 
I have another quick question. While working on this CP 340 Send function I'm trying to understand what the "Len" parameter does on the Function Block. It says its the data length. So I guess my question is what is it used for?
 

Similar Topics

I am using the siemen CP 340 module to output a data packet consisting of a string of 10 characters. The problem i am facing is that with this...
Replies
1
Views
1,673
Has anyone ever got this message before? The drive will be running fine and for a couple days or a week then the control room will get the message...
Replies
6
Views
558
Hi, I am logging tags every 24Hr in table view in siemens WinCC RT Professional. Every day at 7:00:03 AM a value is logged. WinCC takes value from...
Replies
17
Views
3,544
Hi everyone. Please help me to upload program from S7-1200 with TIA v14. I created new project, go to Online tab, select Upload devices as new...
Replies
0
Views
1,082
Hello Every one I am trying to connect the encoder with siemen's 300 plc but dont know how to do it... Could some one send me the connection of...
Replies
4
Views
2,198
Back
Top Bottom