Datman

MrPLC Member
  • Content count

    59
  • Joined

  • Last visited

Everything posted by Datman

  1. DDE question

    Stupidav: I can get the code you have shown to work fine, however i dont want to use a text box or any objext for that matter, I want to just write a data value to an integer in the PLC. I guess I can use a 'hidden' text box, which I have tested and works fine, just a bit ugly thats all. thanks for your help guys, I think I may be able to work around it anyways :)
  2. Hi guys Im new to the whole DDE thing, just after a bit of advice. I am using a Micrologix 1100, am wanting to use DDE to access data so i can show basic PLC I/O on my VB application. I am also using RSLinx Classic as the DDE server. So far I have had a bit of a play and i can successfully read data into text boxes on my application using the following commands: txtIO.LinkTopic = "RSLinx|BOARD COUNTER" txtIO.LinkItem = "O:0/1,L1,C1" txtIO.LinkMode = 2 txtIO.LinkRequest txtIO.LinkMode = 0 and so output 0:0/1 is displayed in my text box 'txtIO'. Happy days, works fine. My question is thus, do i have to open the DDE topic every time i want to look at data... I cannot just leave the DDE link open, for a 'polling' type operation? Ideally what I want to happen is that when an input to the plc becomes true, I trigger the VB application and do my data transfer, then do nothing until the next time the PLC input is true, transfer more data etc... Sounds simple and probably is, but im just unsure of how i can set it up to do this. Thanks for any help, hope it makes sense!
  3. DDE question

    I have looked at the RSLink help and some examples on here, but they all use VBA in excel. Say for VB6, if i was using this syntax would you expect it to work? Dim RSIchan As Variant RSIchan = DDEInitiate("RSLinx", "BOARD COUNTER") DDEPoke RSIchan, "N7:0,L1,C1", 10 DDETerminate (RSIchan) Thus writing '10' to N7:0 in the PLC. It does not work, am i using the DDEPoke command properly? I can read data using DDERequest no problem at all, just not write
  4. DDE question

    Im only trying to send a value of '10' to the integer N7:20. Im picking the syntax i have above must be wrong? It just doesnt want to party at all :(
  5. DDE question

    cool just as i thought, thanks. luckily bandwidth is not such an issue, only a small application. My next question is, I want to write a function that will write a value to an integer in the PLC at the moment i have: Public Function WriteInteger(data As String, address As String) DDEPoke RSIchan, address, data End Function where data is the value, and address is the item eg N7:0, being passed from another function. However it does not work. Is my syntax in the DDE statement wrong, or is it not possible? RSIchan is already set up as the DDE link and initiated in a previous routine ( nd the link left open)
  6. Hi Guys Im having a play at the moment with visual basic 6, using DDE with RS Linx OEM to read tag values from a micrologix 1500. I managed to set up the DDE topic and get it working ok, however my visual basic methods are a bit hit and miss. I'm a bit confused as to what project references one would need to use in VB to achieve this. I used Microsoft Excel 9.0 Object library and it seems to work. Just wondering if anyone knows what libraries achieve what. Thanks guys.
  7. visual basic DDE

    So true! Fantastic, thanks for the help guys
  8. Hi guys wondering if anyone can help me with something im trying in vain to achieve with Rsview. I am new to this software and panelview's. Because of the way my data is being stored in the plc ( micrologix 1500 ) I have run into problems. What i essentially need to do, is have one display which loads a different parameter file depending on which goto display button is pressed. Thats all very well. But, I need to set a different tag to br 'true' depending upon which parameter file has been loaded, so that my plc knows where to store the data. I can not find any way of setting a different tag value for each parameter file ( or goto display button that has been pressed if you like ) to show which parameter file has been loaded. An easy solution is just to create 8 displays for the 8 goto displayb buttons, and each display run its own macro to set the tag on startup. However i would prefer just to use the one display. Hope this makes some sort of sense to you... any help much appreciated, getting very disgruntled with the panelview / rsview system!! cheers guys.
  9. I thought i may have been a little vague the parameters i am loading are similar, but for different setups as you say. ill try and explain better what i am doing... i have a list of data, which i am using a control list selector to display. each caption (row value) has a tag placeholder, ( eg #5) which points to the corresponding tag in whichever parameter file has been loaded. when enter is pressed, the corresponding state value is sent to a tag in the plc. Because of the way the data is being stored in the PLC, i need this tag to be different depending on which parameter file has been loaded. That is essentially what i need to do, find a way of telling the plc which parameter file has been loaded into the display. It would be good if the goto display button which takes me to the display, was able to set a tag as well as load the parameter file. Thus i would know which parameter file had been loaded. Making any sense? I wont delve into depths about how my plc program works... Im new to this so im probably doing it the most inefficient way possible! cheers