andybdjuk Posted June 17, 2010 Share Posted June 17, 2010 Hi Would you be kind enough to give me some pointers on how to control a couple of relays on a Ethernet I/O module i want to control. I have attached the manual. Thanks for your help Andy edio100_manual.pdf Link to comment Share on other sites More sharing options...
andybdjuk Posted June 17, 2010 Author Share Posted June 17, 2010 Hi regarding my last post, i can run the control box from a test program supplied but not from Daqfactory. I have set up a Device IP 168.192.0.10 port 102 Protocol ModbusRTU. I'm not sure what to set the I/O to i assume Force Coil. I called a channel Relay and set channel to 8 as discrided in the last page of the manual. In command line I set Relay to 071 to turn the relay on but just get time outs. can you give me some ideas on settings. Ultimately I want to be able to control the 2 relays from Daqconnect Andy Link to comment Share on other sites More sharing options...
AzeoTech Posted June 18, 2010 Share Posted June 18, 2010 This device does not appear to be a modbus device. You are going to have to figure out what the protocol is. The docs are a bit lacking, so you'll probably want to establish the connection, then using the DF serial monitor try entering direct commands as described (poorly) in the manual. Link to comment Share on other sites More sharing options...
andybdjuk Posted June 19, 2010 Author Share Posted June 19, 2010 Thanks for the pointers, I set up a new device 168.192.1.10:102 with a NULL protocol ad as suggested and reading the manual I set for relay 1 to turn on with 0711013 and the relay turns on likewise 0701013 turns it off. My next question is how do I set up two channels to send the string to control the relays bear in mind I eventually want to do it via DaqConnect and also two channels to read the returned string with the status of the relays and inputs ie Rx (15:52:16.690): 48484848484848481310 I'm not sure what to put i the i/o and channel boxes as its not modbus Thanks as always Andy Link to comment Share on other sites More sharing options...
AzeoTech Posted June 20, 2010 Share Posted June 20, 2010 If you are only going to use a couple relays, and you want to use DAQConnect, just skip channels altogether and just create a sequence to do each of the tasks you want. If you want to be more advanced, create a single sequence that sets a specified relay to a specified state. Doing control from DAQConnect requires that you right a event sequence, so that sequence can simply call your relay control sequence. Link to comment Share on other sites More sharing options...
andybdjuk Posted June 22, 2010 Author Share Posted June 22, 2010 Alas I need a little more help, can you give me a example of how I send 0711013 to the port I created and read back from that port. Thanks Link to comment Share on other sites More sharing options...
AzeoTech Posted June 24, 2010 Share Posted June 24, 2010 The serial/ethernet communication guide (in your start menu / DF directory) covers a lot of this, however, I wouldn't create your own protocol. Just use a sequence. To output that string with a CRLF at the end just do: device.mydevice.write("0711013" + chr(13) + chr(10)) how you read depends on whether you get a fixed width response, or something delimited, say, by a line feed. If fixed width, say 20 characters, you'd do: private string in in = device.mydevice.read(20) If delimited by a line feed (ascii 10): private string in in = device.mydevice.readuntil(10) Either way, you should probably purge before the write(): device.mydevice.purge() to clear out any extraneous comms. Link to comment Share on other sites More sharing options...
andybdjuk Posted June 24, 2010 Author Share Posted June 24, 2010 Sorry final question, regarding, device.mydevice.write("0711013" + chr(13) + chr(10)) The (0711013) bit..... what I need to send is, to channel 07 the value 1 and then the chr(13) + chr(10) Thanks Link to comment Share on other sites More sharing options...
AzeoTech Posted June 29, 2010 Share Posted June 29, 2010 Then you want "071". Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.