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.


Messages - BC SYSTEMS

Pages: 1 2 3 [4] 5 6 ... 10
46
Technical support / Re:MSB LSB
« on: April 11, 2012, 12:53:00 PM »
Gary,

Thank you for this.  Again your input is much appreciated.

Cheers

47
Technical support / MSB LSB
« on: April 11, 2012, 03:39:19 AM »
Hi,

Can you please assist.

I'm reading some modbus values to DM and whilst I can calculate the right answer with a calculator I cannot get the maths right in  the PLC.

The data is stored in two registers say 40001 and 40002,

If I work in hex the data is represented as 3 and A660  respectively, if I input this into my hex calculator as 3A660 adding the MSB and LSB then change to decimal I get 239200 which is 239.2Volts - fine.

Because the DM's are 16 bit, in the PLC I read 3 and -22944, even if I read the data into the system 32 bit variables as 3 and 42592 I cannot get the maths right to convert back to my required 239200.

I don't need the full three decimal places so will probably divide the number by 100 again so I can store the final value back into DM so my HMI can read the data so temporary use of the 32bit variables would be nice as I have around ten values to convert....

Cheers  Marcus


48
Technical support / Re:MPU Input
« on: April 08, 2012, 08:51:24 AM »
Thank You Gents

I will use your example Gary and come back to you.

Many thanks.

49
Technical support / Re:MPU Input
« on: April 02, 2012, 01:16:43 PM »
Thanks Gary,

The relationship may not be linear I just showed the position as an example.

In fact the position will need to be adjustable, so what I'm really looking for is a map or cross reference which is why I thought the lookup table would be a good idea.

What I want to do is look at the RPM signal after the raw input has been converted i.e DM[1] =356 RPM, now id like the code to look at the RPM range 355 - 340  and set position based on the x ref to X.  For this to work I guess I need the following:  

A RPM table made up from 10 sections I will also need a position table of 10 sections, so,

RPM  Position

0  -----  1
2  -----  1
4  -----  5
6  -----  5
8  -----  8
10  -----  9
12  -----  14
14  -----  14
16  -----  14
18  -----  30

This could be DM[10] to DM[20] for the RPM and DM[30] to DM[40] for the stepper position.

Now I need a function to look at the actual RPM (DM[1]) and complete the x ref and give me a position - simple!  

Maybe a nested For to loop will perform the required xref??  so far I have tried and failed.

What do you think?

50
Technical support / Re:MPU Input
« on: April 01, 2012, 03:25:40 AM »
Thanks,

I'll try that and come back to you.

Cheers

51
Technical support / Re:MPU Input
« on: March 31, 2012, 11:51:50 AM »
Hi,

I have ordered the widget and I will report back when I have tested it.

I want to position a stepper motor based on the RPM signal.  I guess I need a lookup table but I'm struggling to get off the ground with this....

The RPM signal is fine, the stepper motor control is fine but i cannot make an association between a RPM value and a position, eg.

RPM        Stepper pos
0        =      0
5        =      3
10      =      6
....................
1550    =     1000

I need to cross reference the RPM and stepper position and put the required stepper position into a DM

The only way I can do this is with a whole load of IF statements........

Any ideas anyone??  all help appreciated.  

Cheers

52
Technical support / Re:MPU Input
« on: March 22, 2012, 01:10:47 PM »

53
Technical support / MPU Input
« on: March 22, 2012, 01:07:59 PM »
Hello all,

I would like to measure a magnetic pick up (MPU) using one of the high speed counters converting the MPU signal into RPM.

The MPU Signal is AC 35 - 55V so will need conditioning prior to being attached to the PLC and I expect to see about 4575 pulses per second so have some questions.

Has anyone done this before and does anyone know if there is an IC or widget that I can use?

Can the PLC actually count the inputs that quickly?

Cheers





 

54
Technical support / Excel Link
« on: February 15, 2012, 06:46:03 AM »

Hi,

we have a requirement for the excel link program and we have a copy of the program supplied back in 2004-2005 on CD.

The program version is V1.00 so I looked online to see if there is a later version as per the upgrade.htm file suggests but the server will not authenticate with the excel link user and PW in the htm file?

Is the a later version?  if so, can you re-allow access or email me updated logon details?

Cheers

55
Technical support / Re:MBTCP Master
« on: January 04, 2012, 04:02:38 AM »
Hi,

Your right, the problem was the location of a line of code, move the line, problem gone!

Cheers.

56
Technical support / Re:MBTCP Master
« on: December 30, 2011, 02:31:25 PM »
Evening,

I have re-arranged some of my functions in-line with your example and changed my function call structure a little which appears to help.

Interestingly, when the master tries to connect to each slave, the connection fails twice before a successfully connection is made pretty much every time to every slave?

The panels are connected via WiFi gateways so there will be a little more latency than your hard wired test rig however the delay is minimum.  The average ping time to each panel from my office 450 miles away is around 150ms.

I will see how the system performs over the next few days.

Thanks for the assistance.

57
Technical support / Re:MBTCP Master
« on: December 29, 2011, 05:06:39 AM »
Thank you for the example.  I will compare this with my code and see if the reliability improves!

58
Technical support / Re:MBTCP Master
« on: December 23, 2011, 11:58:27 AM »
Thank you for clearing up some of my misunderstandings!

Regarding the hostlink command from the client.  Will the client close the connection automatically or do P still need to close the connection?

I will try the Hostlink commands and report back my findings.

Cheers

59
Technical support / MBTCP Master
« on: December 22, 2011, 02:33:21 PM »
Evening all.

I have some questions regarding the MBTCP functions within the PLC.

We are using seven nano's to control some pumps in different locations around one of our customer?s site.

The master is also connected to the site SCADA system which views the system status via the web page in the nano.

The topology is one master connected to a tank level sensor and six slave pump panels.

Each panel communicates using a WiFi gateway and the communication is good between all PLC?s.

The master PLC reads the tank level and if the level is above or below the set point, it uses a writemodbus function 1 or a 0 to a DM value in each of the slaves ? simple as that.  Each of the slaves reacts depending on the DM value.

The first question I have is about the number of connections limit.  Is this six for incoming and outgoing connections?

We have set the MBTCP connections to 2 and Server connections to 4. Were assuming the web traffic comes in via the server connection allocation but you know what they say about assumptions!

As described above we have six slaves, when we attempt to connect to a slave, if the connection is successful we call the modbus function above, if the MB write is good we close the connection and move on to the next panel.

We have some error detection code that recalls the function 3 times for both the TCP connection and the MB write before we move on anyway to avoid hanging up the system if one of the slaves is off-line etc.  Every time there is an error or before we connect to the new slave the TCP connection is closed.

This way we are only using one connection to connect to all the slaves which was necessary as there will hopefully be more slaves (panels) in the future.

Second question, when we close the TCP connection does this close all TCP connections in and out?

Third question, is this the best / most efficient way of communicating to each of the slaves?

We have considered using the host link commands but we would still need to open / close the connections as we move around so we thought we would stick with the devil we know. 

The problem we have is the panel locks up completely randomly, sometimes hours, sometimes weeks after a power cycle and I can?t seam to pinpoint the failure because the PLC does not accept any TCP communications and we are not local enough to go in via the RS485.

Any thoughts or wise words greatly appreciated.


Cheers


60
Technical support / Meter Bus (M-Bus)
« on: December 08, 2011, 11:01:49 AM »
Hi.

Have you interfaced any PLC's with m-bus enabled devices?

Cheers

Pages: 1 2 3 [4] 5 6 ... 10