Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - peterh_DK

Pages: [1]
1
Technical support / Flow control in modem
« on: March 18, 2008, 06:50:22 AM »
Hi There,

I have 5  pcs T100MD888 connected to Fargo Telecom Mobile modems and one Windows server also connected to a Fargo Telecom Mobile modem. All modems are running at 9600 Baud
Once per day or when the DM[] variable reaches a threshold, each plc Modem dials the server modem and dumps the DM[]  ( in a padded format) and reads the RTC.

I use the Trilogi server version 2.0 and  the standard dial modem function supplied by Trilogi.

When sending  the data to the modem it is converted  ? on the fly? to text with zeros being padded and some hyphens and commas are added  as date and field delimiters and a CR for every 10 values in the DM.
Each Record is 10 positions in the DM as follows:
DM[1] = Date, DM[2] = Month, DM[3] = Year, DM[4] = Hour, DM[5] = Minute, DM[6] = Second, DM[7] = Value, DM[8] = ID, DM[9] = Value, DM[10] = Spare,

i.e if the DM Variable looks like this
18 3 2008 9 14 26 1 139 0
18 3 2008 9  9 26 2 139 0
18 3 2008 9  9 26 3 139 0
18 3 2008 9  9 26 1 139 0

it will be sent as records like this

18-03-2008,09:14:26,1,139,0 [CR]
18-03-2008,09:09:26,2,139,0 [CR]
18-03-2008,09:09:26,3,139,0 [CR]
18-03-2008,09:09:26,1,139,0 [CR]

This works and has been working fine for more that 12 months, as long as the DM[] is not filled beyond DM[1500]
If there is more data then some data is lost , not much just a comma or a few characters, but of course enough to corrupt data., and messing up the import rutine on the server
Until now I have solved it by sending data as soon as the DM[] variable reaches 1400 positions.
But now I will be installing at a site where the DM[] will fill up completely 2-3 times a day. So I have to solve the problem., because dialing up 5-10 times per day is to expensive, and the PLC is blocked during the process

I now guess the corruption is due to a buffer overflow I therefore introduced a 400 ms pause  for every 50 records being sent, by adding the following in my ?send and format data? procedure

If Y MOD 500= 1 then
Delay 400
End if

This actually works ( have tried  filling up the DM[] to positions 3840 10 times and transferring data), but prolongs the transfer time by 3 seconds in which the PLC is inactive

But I am worried about using the Delay function, would it be better to make at For Next loop to create a pause in the flow or is there another way of reducing the speed of dataflow?

/PeterH


2
Technical support / Almost dead TMD100
« on: November 01, 2007, 08:39:10 AM »
Hi there one of my PLC's has "almost" died. When I connect the power , the green power led next to J1 only lights up partly.  It is sort of half dimmed or blinking. Any idea waht that means. I replaced the PLC and got the system going again but is the board dead?

/Peter

3
Technical support / T100MD+ as a timer
« on: June 05, 2007, 01:36:11 PM »
I have an input activated by a PIR sensor,and I would like to know how long the sensor "goes high" when sensing movement. Is there a way where I can measure the amount of time that an input is activated? I am only talking milliseconds - so reading the RTC is not an option

/Peter

4
Technical support / I need 3-5 Volt
« on: April 12, 2007, 08:49:58 AM »
Hi There,

I am using some T100MD888 units as simple  polling devices, with only 3 input and 3 outputs active and a 24 V power supply. Now I would like to connect 2-3  PIR sensors ( from www.parallax.com) - a neat little unit that requires 3.3 to 5 volt  for operation and draws < 100uA

I can se that there is a 5 volt output on the Analog connector  (which I am not using. Can I use as supply for my PIR sensor?

/Peter

5
Technical support / how to RESET
« on: January 10, 2007, 05:53:39 AM »
I have blown two RTCs on two different T100MD last week and had to change the RTCs. After changing the RTC and connecting to power - output 6 has been activated and I have had to RESET the unit. I have dones this by downloading the  programme again and clicking  YES to Reset.
But is it possible to RESET the unit without a pc?
Maybe I missed something in the manual

Best Regards

Peter

6
Technical support / Trnsmission errors
« on: January 02, 2007, 01:39:16 AM »
Hi There,
Has anybody got some experience in transmitting text files?
I have 3 TM100MD+ with RTC  and each is connected  to a Fargo Mobile modem

Each unit dials in every morning and dumps the content of the DM[] array, using TLServer on a host machine.
This  basically works fine. The output from each DM[] array is formatted while sending in order to reflect records in a database
The format is as follows:

Date, time, value1, unitID, value2 >CR>

Two of the units usually return 50-70 lines ( i.e. records) and one unit usually returns 100-200 records.
I have received approximately 15.000 records this way during the last months but every week I get some transmission errors where some characters are lost.
My SQL database can handle the import errors, but I loose data.
What can I do to raise the transmission quality or even better how can I check that the transmission is ok on a character level?

I check for the <OK> when I close the text file with Print#1 "/" Command but these errors are in the middle of the transmission.


Examlpe 1 Line 3: the characters "3,0 <CR>" are lost
 
20-12-2006,15:34:28,1,123,0
20-12-2006,15:35:42,3,123,0
20-12-2006,15:35:48,3,1220-12-2006,16:14:10,1,123,0
20-12-2006,16:14:12,3,123,0
20-12-2006,16:14:39,1,123,0
20-12-2006,16:17:25,1,123,0
20-12-2006,16:19:12,1,123,0


Example 2 line 4: ?30-12-? is sent twice
30-12-2006,15:26:09,3,123,7
30-12-2006,15:26:15,3,123,1
30-12-2006,15:26:26,2,123,0
30-12-30-12-2006,15:27:13,1,123,1
30-12-2006,15:27:15,1,123,1
30-12-2006,15:27:18,1,123,0
30-12-2006,15:29:44,1,123,11



Example 3 line 4: almost a whole line is lost

21-12-2006,15:03:08,3,123,0
21-12-2006,15:03:10,2,123,0
21-12-2006,15:03:35,1,123,0
21-12-2006,15:03:38,:41,1,123,0
21-12-2006,15:11:55,3,123,0
21-12-2006,15:12:02,2,123,0
21-12-2006,15:12:04,1,123,0
21-12-2006,15:12:07,1,123,0

The examples are just cut out from the complete text files, and the errors usually occur after line 140 typically around line 150-160.

This makes me wonder whether I have a programming error in formatting and sending the file,
but I doubt that this is the case since it is a simple:  for i = 1 max DM size loop,  and it works fines "most" days

Any ideas how can improve transmission check




/Peter

7
Technical support / Modem connection again
« on: October 21, 2006, 12:20:41 AM »
Hi there,

I have been running the TL server on a Win98 machine with an internal modem for some months now and it is working fine. I have Plcs dialing in and downloading data very night - no problem.

But now I want to move TLServer to an newer/safer XP machine, but I cant make TLserver pick up the phone with the new machine.
I have tried changing modems both internal and external but the problems remains.
1) The PLC dials in Through a Fargo GSM modem tol a landbased line.
2) TLServer recognizes the call with a  "RING"
3) TLServer Hangs up with " NO Carrier"

is this an XP problem or am I looking in the wrong direction?

Anonther question is the Init Straing AT&K0 what is taht i do not recognize K0

Peter

8
Technical support / Modem connection
« on: September 20, 2006, 01:26:26 PM »
Hi There,
I?ve got at T100MD888 Plc connected to a  Fargo Maestro GSM Modem. Communication is one way ? From PLc through Modem-to-modem-to-PC-running-Trilogi server
The PLC dials a predefined modem number and  when connected it dumps some of the content of the DM variable. I use the modem script from Trilogy
This has been working fine for a month now. The PLC dials the number every night at 0315 and dumps the DM variable ( approx DM[1] to DM[1500]  to a text file and sends a short email.
BUT twice the PLC has dialed the number without connecting and NOT hung UP.
That means the modem has been on for several hours and only hung up when the prepaid SIM card ran out of money.
When I go to the PLC everything looks fine - data is in DM. So i Change the PLC RTC to 0313 and two minutes later the connection is made, Data dumped, email sent and RTC syncronised with the Server through a trilogy script. but what went wrong ?
I am not sure where to look for the error. Does anybody have a modified version of the modem script that works better?

9
Technical support / What happens when you don't reset
« on: August 26, 2006, 04:38:17 AM »
I am using a T100MD+. After downloading a new version of a program i usually say YES to Reset. But now I would like to make some minor modifications to the program and retain the information aleady captured in DM[] + leave the RTC untouched. If I download a new software and say NO to Reset, wille it perform correctly and retain the DM[] values?

10
Technical support / Email with TL Server
« on: August 24, 2006, 08:03:42 AM »
I am using a T100MD-888 with RTC connected to a Fargo Modem. Once or twice per day the PLC dials a number, connects to a PC running TLServer, dumps the DM memory to a text file and sends a short email with 3 values taken from DM[].
Recepient is defined as myname@mydomain.dk and sender as sender@anotherdomain.dk

This has been working fine for two weeks.
But yesterday i received the  email from the PLC/TLServer from "plc@plc.com"

where does that name come from?  It only happend once! The nex email a few hours later was correct.

Any aideas?

11
Technical support / Delay function in Ladder
« on: July 06, 2006, 07:58:31 AM »
Hi there,

I?ve got a new small problem:
I would like to ?filter? the input on 3 input channels, so that I max use one input per 3 seconds.

The inputs are Push Buttons activated by humans. And I don?t want to record somebody activating a button e.g. 10 times i 3 seconds.
I would therefore like to make all 3 inputs inactive for a specific time ( e.g. 3 seconds) when one of the inputs has been activated.
I can do this in Tbasic with the ?Delay? function, but that stops everything else which is not intended.

I just want to stop these 3 inputs from responding

Can somebody help me  with a solution in Ladder instead? Something like this:


Input1 ------- Block   -------------------I-- Out1
                      N.C.                              I-- Block ? Ideally a 3 sec relay
                                                           I--  Function1 ? My stuff   

Input2 ------- Block   -------------------I?Out2
                        N.C.                                        I-- Block
                                                           I--  Function2 ? My stuff   

Input2 ------- Block   -------------------I?Out2
                         N.C.                                   I-- Block
                                                           I--  Function3 ? My stuff   

12
Technical support / Merging Files
« on: June 25, 2006, 10:59:12 AM »
Hi there,

I have coded some rungs in a seperate testfile that I would like to copy into my main file. I can copy the rungs to the Clipboard and paste them into the main project, but how do I copy I/O tables?

/Peter

13
Technical support / Serial Communication via Modem
« on: June 13, 2006, 06:35:10 AM »
Hi There,
I?ve got at T100MD888 Plc connected to a  Fargo Maestro GSM Modem. Communication is one way ? From PLc through Modem-to-modem-to-PC-running-Trilogi server
The PLC dials a predefined modem number and  when connected it dumps some of the content of the DM
  • variable.


I use Tri-logis custom function to control the modem. This works fine ? most of the time ?.
As long as I only transfer from DM[1] to DM[200] is works every time, but If I send 1000 variables I often loose the line.

I am not sending it  all at once but I packets of 10 the i.e.
Y = 200
For I = 1 to y step 10
   put dm [I to I+10] into to A$ as one string
    Print#1 A$
Next

I hope this ensures that the serial buffer doesn?t  overflow but I am not sure, and I don?t notice if the lines breaks

The problem is I don?t  perform any quality control whatsoever. Just dial up ? send data ? clear ram.
So instead of writing from scratch I just  want to se if there is some code available already, using Incomm/ Input$ to check the transmission.
Any samples I could have a look at?

Best regards

Peter

14
Technical support / E mail error code 501
« on: February 23, 2006, 01:22:32 PM »
I have purchased a T110MD+49 + RTX and got it up an running on the control side but when i send Email through TLServer Version 2 I have encountered 2 problems:

A function is programmed as follows
print#1 "<EMAIL Tosomebody@xxx.dk>"
print#1 "Sender: peter@xxx.dk"

   Data_string
   Data_string
   Data_string
   Data_string
print#1 "</>"

It works fine and the mail is sent and is received in Outlook.
But the receiver cannot see who it is addressed to. The "TO" field simply states "Undisclosed recipients"  I would like the "TO" field to be filled in. Can that be done?

Secondly the TL servers reports a Syntax  Error 501  indicating a problem in the From address
Why is this?

Pages: [1]