Datman

MrPLC Member
  • Content count

    59
  • Joined

  • Last visited

Posts posted by Datman


  1. yea i tried the single rung thing, no joy. It came up with the same communication error once. then the next time i got a different error something about a corrupt processor. yay... and the phone connection is definitely crap.. Unfortunately here in New Zealand some places cannot get broadband, this site being one of them. So the process for dialing in to this particular customer is to connect to their modem using a laptop and bluetooth connection through our 3G cellphones, which connects to their modem, which lets us talk to their main network. ie many pieces in the connection puzzle for cock ups to occur. The silly thing is they have a ML1400 on site which i have programmed many times without issue. The first time i try to program the SLC, this happens.

  2. ah excellent good to have some concrete advice on how to do this thanks very much!! ok so basically there seems to be no way in hell i can recover this thing remotely. Man the missus will be happy, its the weekend here and a 5 hour drive to the customers plant so that means an overnight stop. ruined my weekend!! Dont even get overtime pay :(

  3. Hi guys i desperately need your urgent help!! I have searched a bit on the net but dont have any definitive answers... Basically we have an AB SLC 505 which is running a bit of devicenet remote I/O. I'm unsure on the exact hardware configuration as i'm new to this project. Anyway, yesterday we had to make some remote changes. There is a modem on site allowing us to dial into the network and we can then reprogram the PLC's on site. Its a slow dialup connection in to the site but it works. Until yesterday that is... I was performing a code download to the SLC, where is suddenly popped up with "communication error" and dropped out. I can still see the processor online with RSLinx but it is now named "DEFAULT". I cannot seem to download a program to it, sometimes i get the error "The selected processor is not a Micrologix or SLC PLC" or it will start to program, get through "Writing IO tables" etc but the drop out with same "communications error" as above. I have tried doing a who active go online, and i get the following dialogue: Default program loaded due to NVRAM error. A corrupt CRC was detedted (loss of battery power may cause this), or a power cycle in the middle of a user program download, initialize memory or memory module load. I hit OK. Says can not go online from default processor (no Program)You must perform a down load. But then when tryign to download it does all the stuff above and i cant download... I have seen articles on the net about having to do a complete processor reset, pulling processor out removing battery and shorting VCC and GND..???? Basically i want to know if its possible to recover this dang thing without having to drive 5 hours to site... It is a bit of a major... Its weird that it is sayign default but it has retained its comms settings and i can still see the processor with RSLinx. There were no errors within my program and i even tried using the old backup program with no success. any advice hugely appreciated! Rockwell have been absolutely no use whatsoever....

  4. Well I finally managed to wrangle the boss into spending some money. now have a VB6 Active X that communicates directly over ethernet using Allen Bradley protocol. Makes life a lot easier and cheaper for us, not having to buy an OPC server for each job. Has a few down sides but pleased with the results so far from an ease of code point of view

  5. This may be a dumb question... We a client with a computer which is running RSView Machine Edition to talk to a PLC.. Im guessing this is using RSLinx Enterprise... I have an application in Visual Basic 6.0, can i make this retrieve data from the RSView application using OPC... VB6 can use the RSOPCAuto.dll (whatever its called..) to acheive OPC comms via RSLinx in our normal applications, but I have never tried getting data from RSView. Is this at all possible in any form? Or would i need to buy RSLinx to put on the PC and talk to the PLC directly via OPC.

  6. Thanks for the offer Peter, but Rockwell have come through over the weekend for us, and so we are underway. The application is on a clients existing system that we are trying to improve the response on - we have had a fair bit to do with the RMC gear, and knowing the history of the QS thought that there must be another copy of the setup software out there somewhere! The other guys in the shop here (Jaymor Industries) remember you from a trip you had to NZ a few years ago and so were interested to hear that you had come back to me. Thanks again.

  7. Hello, I am looking for a copy of the "Hydraulic Configurator" software for the AB 1746-QS module. This is a free download from the rockwell website, but the link is not working correctly (http://www.ab.com/mem/appsys/prodinfo/applac/appla/QSsw/index.html) even when we are logged on correctly through the techconnect program. Does anyone have a copy or another link they could forward on to me? Cheers, Lyndsay

  8. just one more question on this... is OPC slow to write? I have just a single write, which seems to take RSLinx 1 - 1.5seconds to write the data down to the PLC after the syncwrite call has finished. Is this normal? My updaterate in VB is set to something like 20, polled messages setting in RSLinx is set to 1msec. It is causing me some timing issue in my program, can i expect any faster?

  9. you are right... whats even weirder, is i cant pass my array into this fucntion as an integer, then cast it as a variant by doing writevalues = cvar(temparray)... the array must be declared and passed into this function as variant... i suspect maybe something to do with the size, a variant is 16bytes, an integer 2 bytes? why we only see it with the value 9 is beyond me though... anyway, thanks very much for your help!!!

  10. easiest if i just post my code here. these are my declarations: Dim WithEvents AnOPCServer As OPCServer Dim WithEvents ConnectedOPCServer As OPCServer Dim ConnectedServerGroup As OPCGroups Dim WithEvents ConnectedGroup As OPCGroup Dim Groupname As String Dim OPCItemCollection As OPCItems Dim ItemCount As Long Dim OPCItemIDs() As String Dim ItemServerHandles() As Long Dim ItemServerErrors() As Long Dim ClientHandles() As Long Public Function OPC_Connect() 'Call OPC_Connect("BOARD_GRADER") Dim ConnectedServerName As String Dim ConnectedServerName2 As String Dim i As Integer Dim test As Variant 'Create a new OPC Server object Set ConnectedOPCServer = New OPCServer 'Load the selected server name to start the interface ConnectedServerName = "RSLinx OPC Server" 'Attempt to connect with the server (Local only) ConnectedOPCServer.Connect (ConnectedServerName) 'Prepare to add a group to the current OPC Server ' Get the group interface from the server object Set ConnectedServerGroup = ConnectedOPCServer.OPCGroups ' Set the desire active state for the group ConnectedServerGroup.DefaultGroupIsActive = True 'Set the desired percent deadband ConnectedServerGroup.DefaultGroupDeadband = 0 ' Add the group and set its update rate Groupname = "GRADER" Set ConnectedGroup = ConnectedServerGroup.Add(Groupname) ' Set the update rate for the group ConnectedGroup.UpdateRate = 500 ConnectedGroup.IsSubscribed = True 'create the items in the group ItemCount = 1 OPCItemIDs(1) = "[BOARD_GRADER]N13:0,L10,C1" 'Item1 = Primary PLC Control Word ClientHandles(1) = 1 Set OPCItemCollection = ConnectedGroup.OPCItems 'Gets an items collection from the current Group OPCItemCollection.DefaultIsActive = True 'Sets the items collection to active 'This line adds the items we’ve chosen to the items collection and in turn to the group in the OPC Server OPCItemCollection.AddItems ItemCount, OPCItemIDs, ClientHandles, ItemServerHandles, ItemServerErrors End Function this is my test function for performing the write. taken from your function above and modified slightly. if you increase the value that the array WriteValues is written as, (WriteValues(i) = i + 2) so that the first element is 9, you should see the error occur.. Public Sub TestWrite() ' Dim Arrays for SyncWrite Dim SyncServerHandles() As Long Dim Values() As Variant Dim WriteData Dim SyncErrors() As Long Dim ItemCount As Integer Dim WriteValues() As Integer Dim i As Long ' Get Number of Items in Group From Server ItemCount = ConnectedGroup.OPCItems.Count ItemCount = 1 ' Redim Arrays for Item Count ReDim SyncServerHandles(ItemCount) ReDim Values(ItemCount) ReDim WriteData(ItemCount) ' Write values 1 to 10 to N63:500 to N63:509 and N63:510 to N63:519 ReDim WriteValues(9) ' Fill with Data For i = 0 To 9 WriteValues(i) = i + 2 Next ' Copy Array Data WriteData(1) = WriteValues 'Data to First Item in Group -- [TopicName]N63:500,L10,C1 'WriteData(2) = WriteValues 'Data to Second Item in Group -- [TopicName]N63:510,L10,C1 ' Pass in the ServerHandles and Values for the items active in Linx For i = 1 To ItemCount ' Pass in ServerHandles SyncServerHandles(i) = ConnectedGroup.OPCItems.Item(i).ServerHandle ' Pass in ClientHandles Values(i) = WriteData(ConnectedGroup.OPCItems.Item(i).ClientHandle) Next ' Write data to server ConnectedGroup.SyncWrite ItemCount, SyncServerHandles, Values, SyncErrors End Sub

  11. ok now i just tried that, exact same result. with the first value in the array to be written as a value 9, vb just crashes out... It must be something to do with my topic setup in rslinx...?? Im using 1msec polled message, using maximum ethernet packet size, and optimising poke packets. Are these wrong, or any other topic settings that should be set???

  12. When doing these block writes, im getting very weird stuff happen with my arrays in VB. this is my write block routine Public Sub OPC_Write_Block(index As Integer, value() As Integer) On Error GoTo errorhandler ' Write a block of items ItemCount = 1 ' Create some local scope variables to hold the value to be sent. ' These arrays could just as easily contain all of the item we have added. Dim SyncItemValues(1) As Variant Dim SyncItemServerHandles(1) As Long Dim SyncItemServerErrors() As Long ' Get the Servers handle for the desired item SyncItemServerHandles(1) = ItemServerHandles(index) ' Load the value to be written SyncItemValues(1) = CVar(value) ' Invoke the AsyncWrite operation. Remember this call will wait until completion ConnectedGroup.AsyncWrite ItemCount, SyncItemServerHandles, SyncItemValues, SyncItemServerErrors, 0, 0 Exit Sub This item has been defined as following: OPCItemIDs(22) = "[TEST_PLC]N14:0,L30,C30" 'Item22 = Block 1 PLC Run Information I have test code running below to write to the above item. i have an array of dimension 30. Now if i make the first value in the array a number above 18, or below 9 it will write the block of data fine. However if the first element in the array is between 9 and 18, i get garbage written down to the PLC. ie the first value in the block on the PLC is something like -2040. Alternatively, it seems if i write the LAST value in the array as a "1" and no other number, then everything else in the block will write correctly. Very weird and extremely fustrating, any ideas??? I dont know if you guys deal with VB much, or is it an issue with the DLL... maybe i have to stop being greedy and write to all my integers individually, and not as a block Dim temparray2(1 To 30) As Integer For i = 1 To 30 temparray2(i) = 0 Next i temparray2(1) = 18 Call frmOPC_Comms.OPC_Write_Block(22, temparray2)

  13. OK, plot thickens... I seem to be able to do all my OPC comms ok with the processor type set to SLC500 or 503, but in this instance the Ispresent or status tags will not work... ispresent tag will work when i change type to PLC-5. BUT then none of my other OPC comms will work, RSLINX appears to perform the write, but the data just does not get to the PLC... its driving me mad!! im going to resort to writing to a bit in the plc every loop, getting the plc to clear this bit, then read it back, if the bit didnt change between when i wrote it and read it then assume a comms error? grrr!!!

  14. Once we get our office network back online today ill let you know how it goes (f*cking windows!!) i can always check the bit four or five times, and once it comes back as an error a few times in a row thats when i decide to flag a comms error on my system... something like that anyway, pretty primitive but what can ya do...

  15. Ive managed to get this all working. Block writes, reads, anything under the sun. but i have a problem someone might be able to point me in the right direction... I get no error feedback from the RSlinx server when no PLC is connected. ie i can create my group, connect to the opc server and everything fine, and when i perform writes and reads, i get no indication of an error. ie for the call: ConnectedGroup.AsyncRead index, SyncItemServerHandles, SyncItemServerErrors, 0, 0 SyncItemServerErrors(1) is 0, indicating everything is ok. I need to implement some error trapping so i know if the PLC is recieving the data or not??

  16. awesome tried that and ive got it working well! one question though... i want to create an item like this: OPCItemIDs(1) = "[bOARD_GRADER]N7:0,L10,C10" i can then perform a syncread and read the 10 valeus into an array fine. however vb just crashes when i try and write to this item. it only like writing to singular items. is there a way to write to something like the above?