RedLion PTV with OCM3 (Milltronics) communication

evgueniib

Member
Join Date
May 2012
Location
Vaughan
Posts
3
Hi,

For some reason I cannot read data from the OCM 3 Milltronics with the redlion PTV.

I tried it with the Hyperterminal and everything works fine. When I try to program RedLion to replicate Hyperteminal, I am running into problems.

In Hyperterminal I enter /t1/ and read /t1/0.000000. I do not have to press "Enter" to get the data out.

In RedLion I am using the following code:

PortPrint(2, "/T1/");
INPUTVALUE = PortInput(2,0, 10, 1000, 12);

I was told this code has been proven to work with numerous OCM3 installations.

The INPUTVALUE only reads /T1/.

I just would like the RedLion to read this one string and replicate Hyperterminal.

Any ideas? Does OCM3 need to be configured before data is read?
 
>Does OCM3 need to be configured before data is read?

If Hyperterminal returns a valid value from the OCM III, then the OCM III must be configured sufficiently to produce that value and return it, no? Maybe OCM won't return any value greater than zero because it isn't configured enough to do so, but it does return a string of zeroes.

Your action through Hyperterminal confirms that the OCM responds properly, does it not?

I have no idea what the syntax is for the RedLion, but if you get /T1/ back, and that term is part of your statement:

PortPrint(2, "/T1/");
INPUTVALUE = PortInput(2,0, 10, 1000, 12);

maybe the Redlion's syntax is not correct?
 
Solution found but no explanation

Thanks for the reply.

For some reason I could not make it work with PTV but made it work with CSMSTRSX model.

With CSMSTRSX configured OCM3 behaved as expected. The result of the read was the string representing total flow with "?" at the end: xxxxxxx.yyyyyy?. With the use of some functions I stripped "?" and converted it to float which was then passed to PLC.

Unconfigured OCM3 response was different, so I would not even bother with the unconfigured OCM3 for the next time.

I still do not know why PTV did not work for me. However, I do not need DVI output so I am going to use CSMSTRSX anyway. I had to mdify code as follows:

PortPrint(2, "/T1/");
INPUTVALUE = PortInput(2,0, 10, 5000, 20);

Also, program properties were changed to read external data when executed with the timeout of 3.0 secs


 
I'm concerned as to why the MC works and the PTV doesn't. They operate almost identically. Is the incoming string the same as it was previously? In your original post you stated that the incoming string is /t1/0.000000 and this poses a problem because when the portinput statement see's the first 0 it will end the read. When a string contains a 0 you will need to use the portread command instead of the portinput.

Thanks
Jeremy
 
Redlion and OCM3

Jeremy,

Thanks for the response. I do not know why PTV and CSMSTRSX responded so much differently. I still ought to find out. There could be a bad serial port on that PTV. The interesting thing is that the polarity (Rx and Tx) I used for CSMSTRSX was reversed and it worked. That's what does not make sense. PTV seemed to work but it read the command /t1/ from the buffer. CSMSTRSX did not read /t1/, it just read the floating point of the total flow. When I have time I will play with it more to get to the bottom of it.

/t1/0.0000 was a response from new unconfigured OCM3. It makes sense because that flowmeter did not yet see the flow, so it retrieved 0.00000. And this response came from hyperterminal. So, definitely hyperterminal works differently then Redlion as I was not able to replicate hyperterminal response from the Redlion. I wwas trying to figure out what was the difference but did not complete it.

So, when I hooked up the computer to OCM3 and issued /t1/ on-site, hyperterminal responded /t1/294856.7. The PTV just read /t1/. I thought I communicated OK as the red and green lights were flashing with about 3 sec interval. When I reversed the wires, just green light flashed and I got no response from PTV.
Then I hooked up CSMSTRSX and it worked with this reversed wiring configuration. Both red and green lights were flashing rapidly. It read 294856.7? (I exceeded number of characters in the string purposly). When I tried to wire it as PTV original wiring, CSMSTRSX did not work at all.
 

Similar Topics

No question - just an FYI I recently had a customer who was using a PTV with a local display using the DVI port. They wanted to move the monitor...
Replies
0
Views
1,293
Im currently building a file for a redlion Productvity unit "PTV". Pretty sweet device! I'm trying to setup a page to display comms failure and...
Replies
11
Views
3,121
Hello sirs, I have a problem like, If I want to use Productivity with USB mouse and Keyboard. Is it possible? since PTV have only 1 USB host...
Replies
2
Views
2,189
Hi Guys, I am trying to download using Crimson 3.0 over the internet using PTV built in Webserver. Can we use webserver to download crimson...
Replies
3
Views
2,883
Hi Experts, I hope I will get help here. I am using PTV with LCD display I also want to be able to view screens on my phone on the internet...
Replies
3
Views
2,487
Back
Top Bottom