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

Pages: [1]
1
Technical support / Re:CORS request failed
« on: September 02, 2015, 08:56:58 PM »
Hi,

Yea, I get why it's like it is. And I guess there's no real reason to change the PLC web server just to support something that's very seldom needed.

I thought of getting the data from plc2 via plc1 like you suggested.

thanks for the response,

cheers,

john

2
Technical support / CORS request failed
« on: August 26, 2015, 07:36:14 PM »
Hi,

I'm having a bit of trouble trying to program some jave/html using a couple of FMD's. I realise this is primarily a plc programming site but hopefully someone can give me a hint.

I have 2 PLC's, plc1 and plc1. Plc1 is acting as a web server and plc2 for data collection. It has to be this way.

The problem is when browsing to plc1 and having that web page try to get data from plc2, using XMLHttpRequest and host link protocol format, I'm getting the CORS request failed, found using Firefox and Firebug.

It appears from reading that the web server needs to have "Access-Control-Allow-Origin:" appended to it's html header and I gather this doesn't occur.

Can anyone help in this area?

cheers,

john

3
General Discussions / Re:I need the answer for this plc question
« on: August 26, 2015, 06:50:13 PM »
Hi,

I don't understand your question. It seems you are asking what hardware to use but the question is to draw a state diagram. As yet there is no programming needed and no hardware specified. You are still in design phase.

cheers,

john

4
General Discussions / Re:Modbus map?
« on: August 26, 2015, 06:45:58 PM »
Hi,

I'm assuming here that you want to connect over the LAN and not RS485.

Firstly you need to connect to the plc you want to write to/read from. The following command will do that:

PRINT #4 "<MBTCPCONNECT 192.168.0.40:502>"

The 192.168.0.40 IP address is the one for the destination plc. The 502 at the end is necessary as it is the port number that is used by MODBUS over tcp/ip

Next, write to a location on the destination plc use the following command:

WRITEMODBUS 4,1,1101,DM[50]

In this instance I am writing to an DM location on the destination PLC from a DM location on the source PLC. How do I know the destination is a DM location? It is the 1000 at the beginning of the 1101 (check chapter 14, pg 10 of the manual). I am actually writing to DM[100] on the destination PLC, you can read the manual to see how the numbers work out.
The 4 at the beginning is the port I'm going out on the source, 4 because I'm using the ethernet socket. The following 1 is the Id of the destination plc, seems redundant but necessary
The DM[50] is the location of the data on the source plc.

Hopefully this makes some sort of sense. It will be very similar for RS485.

cheers,

john


5
General Discussions / Re:how i can get de ip address of a plc
« on: August 26, 2015, 06:29:21 PM »
Hi,
The command GET_IPAddr 20 will put the ip address of the plc in to (in this case) DM[20]. You can of course change the 20 tro any DM address available.
cheers,
john

Pages: [1]