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 - stilesbss

Pages: [1]
1
Just a quick update.  I let the program run for 5 hours yesterday and everything worked beautifully.  Thanks Archie.

2
I got it to work.

I replaced

MyBase.Value = String.Format("{0:X}", e.Values(0))

with

MyBase.Value = Hex(e.Values(0))

My initial test worked.  now i'm going to let it run for a while and see if it will keep count properly.

3
Hey Archie.

I modified the code, but am still getting the same readings.

I have tried to swap the values to look like  (e.Values(0), "{0:X}").  I've tried replacing the {0:X} with just X.  i've tried replacing the X in all variation with D.

Most iterations have no effect on the value displayed in the meter, the rest cause the program to not run.

I am going to keep looking up solutions, but any other ideas you have would be most appreciated.

4
Awesome.  Thanks Archie. 

I will give that a try and let you know how it works out.

5
No worries.

I don't need decimal points.  I'm just keeping track of run time in seconds, minutes, hours, and days.  The timers however seem to be counting up in a weird form of hexadecimal.  it will count up from 1-9 then jump to 16 and count up 28 then jump to 35 and so on.

The counters are doing the same thing, so it must be pulling the value strait from the v-memory location with out converting it.  I am trying to find a command in DirectSoft 5 that will let me convert the value in the timer memory to decimal so i can have the meter pull the value from there but i have not found anything yet.

If i knew more about VB i could probably perform the conversion in the code, but i am unsure of what command to use and where i should put it.

I will keep searching the google and checking back here until i find a solution.

6
Hello Everyone.

I had to set my project down for a while as other things came up, but I'm back at it and I have one more issue to solve before i am fully up and running.

I have meters monitoring 4 timers and 2 counters.  I have noticed that they don't count in decimal.  When i start my runs the seconds timer counts 1-9 then jumps to 16 and counts through 25, then jumps to 32 and counts to 41, then jumps to 48 and continues in that pattern.

In previous versions the Modbus RTUCom had the option to  TreatDataAsHex, which when selected my timers and counters would display the correct values.   I can not find that option in the 370 version.  Is there another way to convert the data from hex to decimal so my displays with show the correct values?

Thank you all.




7
Awesome!.  That helped a bunch and made me feel a lot better.

I got the new revision and took a crack at it this morning.  Initially i was having the same problems that i have been having.  The biggest example of this is my indicator light for inputs x0 (12049 modbus) and x1 (12050 modbus).

When i started only x0 was working correctly and x1 was giving my an error message.  I finally had a eureka moment though.  I had set my COM value TreatDataAsHex to true, because otherwise the meters i have set up to watch various timers and counters don't show the correct value, but that had been messing with my indicators.

I changed the COM setting for TreatDataAsHex to false and bam, xo and x1 are reading properly, buttons for my various internal relays are at least illuminating properly when the relay is on...and actually will turn the relay off, though not back on, but that was expected.

So, i am back on track to get this working pending a fix for the COM driver and i can figure out how to get some of my objects to have the data treated as hex and others not, but i am pretty sure i can work that out in the code.

Thanks you fohdeesha,  and Thank You Archie, you are Awesome.

8
Ok.  Well there has to be something i am missing when it comes to adjusting addresses, and i can't figure it out.

i have not gotten any of my buttons to work.  So i took a step back and am going to try to attack it from a different perspective, i set up a pilot light and connected it to the X0 input of my plc.  Looking at my manual X0s modbus address should be 12049, and it is.  Using that address i am getting the pilot light to show when X0 is on and off, and if follows X0, so if i manually disconnect X0 the pilot light goes out.

X1 is being used in the same fashion as X0,  using the same adjustments for the address the modbus address of X1 should be 12050, but when i put that into a second pilot light it does not work and returns an A1/E1 error message about an invalid value returned.

Is there something i'm missing?  Do i need to make timing adjustments so its not trying to read everything at once.

Its just weird that i can get some stuff to work using the modbus address calculations in my manual and others dont.

Once again thank you for any help you can provide.  I really appreciate it.  That is a fantastic program and i'm really new at this so Thank YOU.

9
Ahh ok.  thats helpful.  Thank you.  I will take another crack at it and let you know how I fair.

10
Thats kind of what i'm trying to find out.  There is a few different ways to calculate the address.

What i have been doing is the following:  584/984 Mode Address
CR take the octal adddress c11 convert it to decimal 9.
Add start of modbus address range, which for control relays is 3072
then add 1 for the mode address.

There is another section that talks about modbus function code.  I think for this it would be function code 05.  set/reset a single coil.

but the none of the address calculations use the function code.  one is what i have done above, and the second converts octal to decimal, then adds a range, then you put a data type in front of it, so C11 would be Coil 3081.

Thank you again for helping.

11
Nope that didn't work either.

12
Thank You.  That was very helpful.

Now i am trying to get the buttons working.  I am not even sure what questions i should be asking so i'm just going to discribe what i am doing.

Using my fan control as an example it.

It is controlled by the C11 control relay.  using the directlogic to modbus address conversion i should be using 3082 as the address.  Advanced HMI won't take 4 digit addresses so i am assuming that i add a 0 to the front making it 03082 and put that in the plcaddressclick cell.  Then i set the output type to toggle and that should be it, but it doesn't seem to be working.

I can only guess that i am not using the correct address, or i have to add something in the ladder logic to let it be used by the hmi.  Any advice is appreciated.

Thank you again for the help.

13
Support Questions / direct logic 05 and ModbusRTU com driver
« on: August 19, 2014, 09:55:59 PM »
Hi there.  I am really new to the world of PLCs but I must say that the communities are amazing.  Everywhere I have gone with questions the people are just awesome.

I have a few questions about connecting a DL05 using the modbus RTU driver.

When setting an address for the the objects there are 4 plcaddress lines,  each with a different ending.  Do they do different things?  Are they used for different objects?  Should each object use one spot, or should all 4 be filled?

Also, which method should be used for adjusting the plc addresses to modbus addresses when directing an object.

That should be it for now.  I have a lot more questions, but many of them depend on what I have already asked. 

Thank you everyone for your help.


Pages: [1]