Redlion_Rs232_Value_updation

bjrajendra the images you posted show that the G3 is receiveing the data from TeraTerm.
It is displaying the last RS232 Raw data set that TeraTerm sent out and paarsed them in the display boxes.

What is the problem? Are you not refreshing the values prior to that last set fast enough?
or do you want to view a cumulative read like the shell in TerTerm?

My device(DSP Processor) sending data to teraterm and hmi at two different times but not at the same time.I showed it how the my device is working with teraterm and hmi , TeraTerm is continuously receiving and displaying my values whereas the HMI is executing the program only once and stopped after completion of the program.I am refreshing always which you can see the my program output at TeraTerm . And I dont know what exactly meant by cumulative read,ThanX
 
Now I think i understand the problem.

I do not think the G3 reads once and quits.
It is displaying the last set of data you sent it. See the blowup of your image. Each string you send is parsed individually and the old data is discarded. Only the latest set of data is displayed.

By "TeraTerm is continuously receiving and displaying my values whereas the HMI is executing the program only once and stopped after completion of the program" I think you mean the shell still displays the old data in its display.

So it appears the confusion is about is it "reading" all the data vs it's not "displaying" all the data.

What I meant by cumulative was continuously appending the string of received data so you can see it grow like in the display shell.
That is what I tried to setup in the last file I attached.
You may want to check but think I changed the start character in the read from your '!' to a 0. Shouldn't hurt the way it reads just don't want confusion.

TeraTerm Shell.png
 
Now I think i understand the problem.

I do not think the G3 reads once and quits.
It is displaying the last set of data you sent it. See the blowup of your image. Each string you send is parsed individually and the old data is discarded. Only the latest set of data is displayed.

By "TeraTerm is continuously receiving and displaying my values whereas the HMI is executing the program only once and stopped after completion of the program" I think you mean the shell still displays the old data in its display.

So it appears the confusion is about is it "reading" all the data vs it's not "displaying" all the data.

What I meant by cumulative was continuously appending the string of received data so you can see it grow like in the display shell.
That is what I tried to setup in the last file I attached.
You may want to check but think I changed the start character in the read from your '!' to a 0. Shouldn't hurt the way it reads just don't want confusion.

If he will put the Count on the screen as I (we) suggested he will see if it reads once and quits or continues to read, but doesn't get the data he wants. I think I would also create another integer tag and call it OnUpdates and put it at the beginning of the program that does the PortInput. That way if it exits the program because there is not data on the wire, we will still know that there was an On Update Event.

I don't know if he really understands what PortInput is doing and what it is looking for. However, there does need to be a delay of some sort between writes from his device or he won't be able to pull a complete string. As I understand it, the string contains all the data he wants to get from the device and then it is resent again. Maybe he should configure his device to only send when there is a change.

If it turns out that the On Update Event is only firing once, that would seem to indicate that the Field Device isn't doing what is needed to fire the event. My guess is that it would need to close the port to accomplish that. Again, this may be something that the Field Device can be configured to do.

If it is doing what the OP says it is doing, maybe the field device is just data storming the port.

Once we get the information we have requested, we may be able to help further.
 
Yes it is updating. I am seeing the my tags changing its value continuosly from 330.2 to 123.4 and viceversa and so on , but the count is not incrementing.I just run the program what Str8jckt gave. Can I know what is the importance of this RS232_Continuous.What is happening if we take the data continuously in RS232_Continuous till it takes 200+ charecters. How the Program worked without incrementing count

Also Yes I really don't know the exact usage of PortInput , as I need to send a string to a tag, I make use of this ! and @ as my starting and ending characters.
 
Can I know what is the importance of this RS232_Continuous.

I stand to be corrected but... from what I read it is stopping the data tag containing the RS232 data from being flooded with data from your field device. It limits the number of characters to 200, well 199 really.

I think the guy who posted it was trying to check that the DSP was actually able to process the data coming in.

I have to be honest, following this thread I have lost track of the original requirement. Would you be able to summarize what you want your system to do with the RS232 input, and how it is not doing it?

I originally thought your values on screen were not updating, however they seem to be doing this from what you have said. Looking at the settings you have on Crimson you won't get a faster update rate so I don't really know what the problem actually is anymore.


....TeraTerm is continuously receiving and displaying my values whereas the HMI is executing the program only once and stopped after completion of the program.

If the value on the HMI screen is changing, how do you know your program is only executing once?
 
Last edited:
Yes it is updating. I am seeing the my tags changing its value continuosly from 330.2 to 123.4 and viceversa and so on , but the count is not incrementing.I just run the program what Str8jckt gave. Can I know what is the importance of this RS232_Continuous.What is happening if we take the data continuously in RS232_Continuous till it takes 200+ charecters. How the Program worked without incrementing count

Also Yes I really don't know the exact usage of PortInput , as I need to send a string to a tag, I make use of this ! and @ as my starting and ending characters.

Since it appears that you are forming the message in the sending device, is it possible for you to include a Carriage Return (ASCII 13) at the end of your message before you send the next string?

I am not sure if this will fire the On Update Event, but you can try that.

I think a better solution would be to reprogram your sending device to do the following:

1. Open the Port
2. Send all the values you want to update in one string
3. Close the Port
4. Wait a short time (this may not be needed)
5. Repeat the process

I think the issue is that the On Update Event of the port is not firing because whatever causes the event to occur is not happening. In other words, I think your sending device is opening the port (which causes the On Update Event of the port to fire) and then it begins data storming the port without "taking a breath". Since it doesn't see the Event again, it never reads again.

There is probably a way to write a program to operate this way, but I don't see any reason to go to that much trouble. No one or nothing can consume or use the data the C306 would receive in the fashion you are trying to send it anyway. Even though the screen could update rapidly, the fastest usable data changes would be 1 second and that is pushing it.

That is why I recommend reformatting the way you are sending data so that it can be handled in a very simple fashion through the On Update Event.
 
I'd like to hear if the OP got this worked out and if so, what worked.

He made it sound like he was forming the packets on the sending end himself so that seemed to be the place to start - but it is hard to know unless he closes the loop.

I'm sure we could have come up with a way to read the data once per second using the On Tick event of the G306, but that wouldn't have been as clean and would have required a lot more work.
 
ThanX 4 all

Finally I got it. Earlier, I am sending the same value continuously and that is why I am not seeing the change(updation) :oops::oops:. Now I am sensing the from the adc and sending the Value :):). I am seeing the change every moment now. ThanX for all, especially JHarbin :geek:, who initiated giving answers patiently to my question, DLMUK :geek:, who helped for better coding, and finally Str8jCkt :geek:, who gave the crimson file with nice display pages.


Hurray:)
 

Similar Topics

Hello, I man trying to use a redlion DA10 converter to read data from a Bronkhorst mini cori flow meter over rs232. I cant seem to get the...
Replies
7
Views
1,547
I want my HMI G07S sending data to both serial port RS232 and RS422 at same time, is it possible? if not, how can I switch the port...
Replies
3
Views
1,882
I hope someone can answer this question quickly, as I have a colleague in Kenya onsite, trying to get the following to work, with no success...
Replies
6
Views
4,905
Hi, I have a strange problem concerning communication between Redlion G306 HMI & Allen-Bradley SLC 5/03 (1747-L531). What it is that I have...
Replies
10
Views
4,983
Hey guys, hoping someone here could give me a little advice. I'm working with a CR1000-04000 in Crimson 3.1 and I was interested in adding the...
Replies
4
Views
143
Back
Top Bottom