All Activity

This stream auto-updates     

  1. Yesterday
  2. AzeoTech

    Modbus tcp and rtu master and slave

    You are talking about Modbus Master? Then yes, it doesn't matter. The ports are handled by the remote device. 192.168.0.1 port 502 and 192.168.0.1 port 503 are two completely different connection points so are no different than 192.168.0.1 port 502 and 192.168.0.56 port 502. To connect to a device you need the IP and the port. Any changes in either of these are a different connection, even though a change of port is still the same device. I like to think of it like a telephone to an office building. The IP address gets you to the main office line, and the port # is the extension. So calling the telephone number (IP address) gets you to the right building (device), but you also need to know the extension (port) of the person (protocol) you want to talk to. If your device has both 502 and 503 open and available to receive calls (sockets), then DAQFactory can certainly connect to both simultaneously using two different DAQFactory "ports" and "devices".
  3. Hi On same project; Can I use daqfactory modbus tcp server on port 502 and for example on port 503 with configuration two different protocol? Same thing for rtu also; com1 modbus rtu master com2 modbus rtu slave
  4. Last week
  5. AzeoTech

    "p-Modbustcp 0010: Timeout" Error

    OK, glad you sent it. You actually have two Ports in your application, even though presumably only one is assigned to a device. You have one called "Ethernet", and one called "TOUCHPRO". Both point to the same device, same place. This is apparently causing an issue, probably because DAQFactory tries to establish both connections simultaneously on startup and your device can't handle it, but if you disconnect and reconnect, DAQFactory staggers the reconnection. Or it just never reconnects the one that isn't used. Either way, if you delete the connection you aren't using, or at least set the IP to blank and the Port to 0, the probably will likely go away. On a side note, 200.200.200.190 is a routable address and so should not be used for internal networking. Use something in the 192.168.x.x, 10.x.x.x or 172.16-31.x.x subnets, as these ranges are non-routable addresses and won't be confused for Internet addresses by Windows. If you don't then when Windows (and thus DAQFactory) can't find the device at 200.200.200.190, it will go to your gateway router and then through it, up into the Internet looking for a device at 200.200.200.190, which appears to be somewhere in Brazil... If you actually meant to use a routable address, don't. There are huge security issues with placing an automation device directly on the Internet.
  6. amp

    "p-Modbustcp 0010: Timeout" Error

    See the attached. Read Channel.ctl
  7. AzeoTech

    "p-Modbustcp 0010: Timeout" Error

    Please post or email your .ctl doc so I can take a look. If its reading data on the one channel, then there must be some other connection inside your document.
  8. amp

    "p-Modbustcp 0010: Timeout" Error

    Only one device and only one channel used. The Ethernet port connecting to PC. Ethernet comms light lights up normal so PC DAQFactory page reads values from the device correctly even when this error keeps appearing. communication seems working fine but still getting this errors. And I noticed while error is popping out to the alert windows, it does slow down reading speed of the channel a little bit but the vale still updates from the device to screen. I will put details as below: Configuration: a. PC with windows 10, no other software except DAQFactory 17.1 installed, Only one device connected to PC via Ethernet port using Modbus TCP protocol. b. Remote device is a HMI that has Ethernet port for data communication, only one Modbus RTU sensor connected via RS485 port. No other device or software connect to this HMI. c. PC set as Ethernet client IP: x.x.x.200 sub: 255.255.255.0 d. Device set as Ethernet server IP: x.x.x.100 sub: 255.255.255.0 (DHCP is not used anywhere) Operation: 1. Connect Ethernet cable between PC. Then open the application runtime file Read Channel.ctl which the same one as uploaded here previously. 2. Watch screen page and command/alert windows. The variable reading shown on the screen becomes normal and value updated from the device connected. Error as mentioned keeps popping into the alert windows and never stops. Ethernet port lights looks normal as ordinary. 3. At this stage, if I disconnect the Ethernet cable for a few seconds and then reconnect. After a few seconds, the error to the alert window stops. And I can the just right click to clear the alert window. Now everything works good. It runs perfect as I expected. 4. But If I close the DF runtime, then open the file again, it will do the same as above again, errors keep coming up. I can only stop this error by disconnecting Ethernet cable and reconnect it. I can not see where else I could have mistake in setting up just one channel read to screen. Please advise.
  9. AzeoTech

    "p-Modbustcp 0010: Timeout" Error

    I meant more than one device / software connected to the remote device. Does it do it from a fresh boot? Does the Ethernet comms light light up when the ethernet is plugged in but DAQFactory won't communicate? Does your remote device use DHCP to get its IP address?
  10. amp

    "p-Modbustcp 0010: Timeout" Error

    100% sure . There is no any other device connected to DAQFactory PC. The PC is brand new with only windows 10 and DAQFactory development 17.1 installed and no any other software. It is purely used for this one device communication, one software and one connection only. Would it be possible to simulate cable disconnecting and reconnecting process while cable is actually connected? I mean kind of like windows device management that you can disable a device then rescan to find it to reconnect.
  11. Channels look just like variables with some exceptions. So, if you have a digital output channel called "LED", you could have a sequence like this: LED = 1 delay(5) LED = 0
  12. Alarms with expressions that are invalid won't trigger, nor will they generate an alert, so you should be fine.
  13. AzeoTech

    "p-Modbustcp 0010: Timeout" Error

    Are you sure you don't have another piece of software or another device communicating with device? Many devices support only one connection at a time. Disconnecting and reconnecting would drop an existing connection and give DAQFactory a chance to connect.
  14. amp

    "p-Modbustcp 0010: Timeout" Error

    This is what the problem is now: While Ethernet cable being connected, open the DF runtime application to start, it will not establish Modbus TCP communication over Ethernet cable. It keeps getting this Modbus TCP timeout error all the time. It will only establish good communication by unplug then plug back the cable. I also tried to use Device.Mydevice.InitComm(), it does not help. I can not tell customer that every time after you open to run the application, cable must be unplugged then plugged in to make it work. Is there any code to use to initiate port in the same way as restarting the comm port when cable is plugged in? What else should I try to stop this timeout error when open the runtime application?
  15. amp

    "p-Modbustcp 0010: Timeout" Error

    keeps reappearing. right click clears errors in the window instantly but then error appears again and again one after the other. Cable is always plugged in. The errors only stops if you unplug and plug back cable.
  16. To avoid bogging down your system by accidentally specifying a big array, DAQFactory will only display the first 20 values in any array. So if you do: myChannel instead of myChannel[0] you'll only get the first 20 values of myChannel, not the entire history, which would chew up a lot of CPU time to display, over and over again. So, you are running up against this. What you'll have to do is display two sets of 16: (To.Bit(x))[0][0,15] and (To.Bit(x))[0][16,31]
  17. AzeoTech

    "p-Modbustcp 0010: Timeout" Error

    First, does the error keep reappearing, or is it simply left over from when the cable was unplugged? Errors in the command/alert don't go away unless you explicitly clear the command/alert window by right clicking and selecting Clear.
  18. amp

    "p-Modbustcp 0010: Timeout" Error

    When I disconnect and reconnect Ethernet cable, it stops the error after short time when connection establish. But with the cable being connected and If I close exit the runtime and then reopen the application runtime, the error comes up again. and will never stop in command/alert windows, but after short while the values and displays are all correct from channel reading and value also updates. Indicating connection is working but error still does not stop. Error stop only if I disconnect and reconnect the cable. Can you please advise any code to stop this error when start the runtime while cable is connected? Thanks, I am learner of DaqFactory and really feel frustrated about this Ethernet communication.
  19. I have a variable that is a 32 bits integer. I want to convert it to a 32 bits binary value and displayed on screen using To.Bit() expression on a variable display component. But it returns only showing maximum 20 bits like {(0,0,1,0........}} . I also tried using From.Bit(B00,B01,B02, ........, B31), it failed. I can only use From.Bit(B01,B02,B03, ......B19) to convert maximum 20 bits only. I read the manual section 4.12.10 on page 74-76 regarding the Bit() conversion expressions. It mentioned to convert 32 bits variable. So why my expression can only convert for 20 bits value? How to convert to or from 32 bits variable?
  20. Earlier
  21. amp

    "p-Modbustcp 0010: Timeout" Error

    Expression CH1.time[0] changes the value displayed., "p-Modbustcp 0010: Timeout" Error still keeps coming to "command/alert" window. CH1 value on screen does update correctly. But this "p-Modbustcp 0010: Timeout" error can not be cleared. It does not make sense to me that showing this alert when data communication is working fine. How can I get rid of this alert?
  22. Hi, Further to the above. Its been a while but yes definitely better with Bit Math thanks. Managed to drastically reduce the code plus also used a function for the repetitive in between code. With ref. to your reply above i.e. Any bits 0-2 on and bit 3 off: min(((S & 0x0f) < 8) && ((S & 0x0f) > 0)) Is there a typo and should be max(((S & 0x0f) < && ((S & 0x0f) > 0)) ? Also, An unrelated question to the topic. Is it OK to have DF alarms setup with a condition code that includes a non-existent channel name? I haven't noticed any errors but thought I'd ask. The reason for asking is that I want to avoid having to delete alarms when modifying the application to a smaller system.i.e. can I just leave the unused alarms in place?
  23. I'm trying to figure out how to use channels with sequences etc as said in title. The first thing im trying to do is simply light up an led on a timer with a button using a sequence. That when the button is pressed, starts the sequence and the sequence lights the led for 5s then shuts back off. I cannot get this to work properly, any help understanding would be appreciated
  24. Yup, you can do a lot with Filter() and since it is internal, it is fast and DAQFactory can do it in real time. I like Search() too. Its a quick way to find certain things in your data.
  25. Thanks a lot for the quick reply! Your tip helped; the filter works just as intended, even with combined criteria (UE9_11>var.kw1min && UE9_11<var.kw1max).
  26. What you have won't work because of the way stream works. Stream sends data in blocks, and so it is hard to process every data point as it comes in. Also, your while() loop lacks a delay(), which will cause the CPU power to spike. You should pretty much always have a delay() inside a while() loop. There are exceptions, but this is a good general rule. Now to your question, it is probably easier to just use the filter() function on the whole incoming data. You can make a V channel that is a calculated v channel (meaning there is an Expression associated with it). That expression would be something like: filter(UE9_11, UE9_11 > var.kw1min) Then whenever you reference that V channel it will perform the filter, which will remove all values that don't match the criteria. Filter() is an internal function so is pretty darn fast.
  27. Hello! I am more or less new to DAQFactory (have done some simple data acquisition, but nothing complex yet). After reading through many threads in this forum as well as spending some time with the user's guide, I still couldn't figure out how to do the following: I want to read two channels from a Labjack UE9 with a frequency of 1000 Hz, so I think I should use the stream mode. So far, so good - acquiring the data at 1000 Hz works fine. Now I would like to copy the values from one of these channels to one of two new channels (for this, I have created two V channels called "T_Pre" and "T_Post"), but only if the signal from the other UE9 channel is between two specific values (variables set by scrollbars). This must work during the ongoing stream acquisition. Only the values from the V channels have to be stored; the stream data can be discarded afterwards. Here's what I came up with (and what does not work): //initialization using ("device.labjack") include ("C:\Program Files (x86)\LabJack\Drivers\LabJackUD.h") //setup stream, set scan rate AddRequest(0, LJ_ioPUT_CONFIG, LJ_chSTREAM_SCAN_FREQUENCY, Var.scanrt, 0, 0) var.streamtext="running..." //clear channel history UE9_12.ClearHistory() UE9_11.ClearHistory(1) //setup channels to stream AddRequest(0, LJ_ioCLEAR_STREAM_CHANNELS, 0, 0, 0, 0) AddRequest(0, LJ_ioADD_STREAM_CHANNEL, 12, 0, 0, 0) AddRequest(0, LJ_ioADD_STREAM_CHANNEL, 11, 0, 0, 0) //start the stream GoOne(0) var.streaming=1 //set variable "scanrate" to actual scanrate global scanrate = 0 eGet (0, LJ_ioSTART_STREAM, 0, @scanrate, 0) while(var.stop==0) //write data to VChannels, if input UE9_11 is between certain values if (UE9_11[0]>var.kw1min) if (UE9_11[0]<var.kw1max) T_Pre[0]=UE9_12[0] endif endif if (UE9_11[0]>var.kw2min) if (UE9_11[0]<var.kw2max) T_Post[0]=UE9_12[0] endif endif endwhile ePut(0, LJ_ioSTOP_STREAM, 0, 0, 0) var.streaming=0 var.stop=0 The sequence is started by a button. Another Button changes "var.stop" to 1 if pressed, which stops the sequence as intended. The problem is probably somewhere in the "while" loop. I'm quite sure that I made a simple beginner's mistake, so it would be very kind if anyone could point me in the right direction. Thanks in advance!
  28. SveinB

    FFT

    I have a channel, logging a signal that i want to do a continius FFT . How do i set up the graph? Can anyone supply an example?
  1. Load more activity